[TYPO3-core] RFC #13467: add getField() function to database API

Felix Oertel post at typo3felix.de
Tue Feb 9 00:29:19 CET 2010


Hi,

thanks for your input.

Am 08.02.10 21:23, schrieb Martin Kutschker:
> Without looking at the actual code. Yes, this is useful, but it can be taken a step further if the
> function would retrieve a whole column (ie a list of field values).

But then it would be getColumn() and not getField(). *g* What is the 
difference between getColumn() and getRows('your_field_here')?
I think it would be great to have something that delivers the value of a 
specified field directly. For all the other stuff (like fetching more 
then one value) getRows() seems just fine.

> If you really need only one you can get it easily with list($column) or $colum[0].

Aight, or with array_pop(mysql_fetch_assoc(mysql_query('SELECT name from 
table WHERE uid = 3')));

*g*

All this function aims to do is, to make it easier to get one value out 
of the database.

Regards, Felix
typo3felix.de


More information about the TYPO3-team-core mailing list