[TYPO3-core] RFC #13467: add getField() function to database API
Martin Kutschker
masi-no at spam-typo3.org
Tue Feb 9 08:41:11 CET 2010
Felix Oertel schrieb:
> 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')?
If the SQL returns three rows then getColumn() returns array('a', 'b', 'c'), whereas getRows()
returns array(array('a'), array('b'), array('c')).
> 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.
Tastes and uses cases may vary.
Masi
More information about the TYPO3-team-core
mailing list