[TYPO3-core] RFC #11916: Feature: New TYPO3_DB method for queries that expect just a single result row

Xavier Perseguers typo3 at perseguers.ch
Sat Nov 13 19:01:12 CET 2010


Hi,

JoH asenau wrote:
> This is an SVN patch request.
>
> Type: Feature
>
> Bugtracker references: http://bugs.typo3.org/view.php?id=11916
>
> Branches: trunk
>
> Problem:
> I would like to introduce a new function exec_SELECTgetSingleRow() to prevent exec_SELECTgetRows() being used for queries that definitely expect only one row to be returned.
>
> Just like exec_SELECTgetRows() it will contain all necessary function calls to execute the query, get the result row, free the result and return the data.
>
> To avoid any additional function calls IMHO it should not be a variant of exec_SELECTgetRows() but another function.
>
> This way we can get rid of exec_SELECTgetRows in case

Attached is v2 with:

- CGL applied
- public visibility set to newly added function
- put $output = array() outside of the condition in order to have it 
always defined even in case of SQL error.

Cheers
Xavier
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 11916_v2.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101113/8e5a0ac8/attachment.asc>


More information about the TYPO3-team-core mailing list