Project

General

Profile

Actions

Feature #20403

closed

Add TYPO3_DB->exec_SELECTgetField() function

Added by Stefan Geith over 15 years ago. Updated over 13 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2009-05-08
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

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

0011050-exec_SELECTgetField.patch (1.54 KB) 0011050-exec_SELECTgetField.patch Administrator Admin, 2009-05-08 09:30
0011050v2-exec_SELECTgetField.patch (1.48 KB) 0011050v2-exec_SELECTgetField.patch Administrator Admin, 2009-05-08 12:35
0011050v3-exec_SELECTgetField.patch (1.48 KB) 0011050v3-exec_SELECTgetField.patch Administrator Admin, 2009-05-08 13:26
Actions #1

Updated by Stefan Geith over 15 years ago

Patch v2 has $GLOBALS['TYPO3_DB']-> replaced by $this->

Actions #2

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?

Actions #3

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.

Actions

Also available in: Atom PDF