[TYPO3-core] RFC: Feature Request #10091: Integrate TYPO3_DB->exec_SELECTcountRows()

Steffen Kamper info at sk-typo3.de
Sat Jan 10 17:26:29 CET 2009


Hi olly,

+1 by reading.

vg Steffen

Oliver Hader schrieb:
> Hi,
> 
> the attached new patch adds the possibility to define the field used in
> the COUNT() expression.
> 
> olly
> 
> 
> Oliver Hader schrieb:
>> This is a SVN patch request.
>>
>> Problem:
>> In the TYPO Core counting rows is/was implemented as the following:
>> * get result set for a "COUNT(*)" query, fetch row, free result set (not
>> in all cases)
>> * get result set for a regular table SELECT, get sql_num_rows, free
>> result set (not in all cases again)
>>
>> Solution:
>> To simplify this, it would be nice, to have an accordant method in the
>> database API that takes care of counting rows:
>> TYPO3_DB->exec_SELECTcountRows($table, $where = '')
>>
>> It's not required to implement this method also in DBAL since it's
>> available there and just uses methods that already got overridden if
>> DBAL is used.
>>
>> Comments:
>> There was a discussion in the dev-list some months ago and Masi had the
>> idea to introduce such a function in TYPO3_DB, read the thread here:
>> http://support.typo3.org/general/dev/m/typo3-dev-tip-use-sql-function-count-354264/p/234/
>> [^]
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=10091
>>
>> Branch: Trunk
>>
>>
>> olly


More information about the TYPO3-team-core mailing list