As a small note if anyone was interested:
I have a class DatabaseQuery which holds among other things the information associated to a specific SQL-query like what tables, columns, conditions et.c it should use.
I wanted a function, something like DatabaseQuery::getColumnValue($name), that would be placed a bit of everywhere in a PHP-file which would return the value of a particular column defined by the DatabaseQuery instance.
What I wanted was that instead of defining all the columns available in class DatabaseQuery beforehand I wanted the getColumn function to dynamically add itself to the list of columns that should be fetched from the database and fetch all of them in one go. The problem is that the columns' values can not be used because the values has not yet been fetched and therefor are empty. I just thought it would be cool to not have to fetch the information beforehand (before knowing which columns would actually be used) but instead only fetch the ones actually used. It's not really a problem it would just be a cool thing to do.