Feature #20403
closedAdd TYPO3_DB->exec_SELECTgetField() function
0%
Description
We often need to read associative arrays from the database that contains only one field from the table e.g. uid=>title oder even only a uid-list.
This could be done with a new function exec_SELECTgetField() in TYPO3_DB.
See Patch attached.
This is useful e.g. for:
- getting an array with Kategorie-Names for a given Category-UID
- or the other way round for getting UIDs for a given Category-Name
- getting an array with UIDs only, that can be processed further by e.g. implode() etc.
(issue imported from #M11050)
Files
Updated by Stefan Geith over 15 years ago
Patch v2 has $GLOBALS['TYPO3_DB']-> replaced by $this->
Updated by Georg Ringer over 13 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0)
IMO this is exactly what exec_SELECTgetRows() does as this got an argument $uidIndexField
can we close it?
Updated by Benni Mack over 13 years ago
- Status changed from Needs Feedback to Rejected
yes. we also try to keep the DB layer as thin as possible. Thus, I'll close this one.