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

Oliver Hader oliver at typo3.org
Sat Jan 10 16:13:32 CET 2009


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
-- 
Oliver Hader
TYPO3 4.3 Release Manager
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00010091_v2.patch
Type: text/x-diff
Size: 1025 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090110/018e3ac4/attachment.patch 


More information about the TYPO3-team-core mailing list