[TYPO3-core] RFC: Feature Request #10091: Integrate TYPO3_DB->exec_SELECTcountRows()
Steffen Kamper
info at sk-typo3.de
Sat Jan 10 17:05:49 CET 2009
Hi Masi,
Martin Kutschker schrieb:
> Steffen Kamper schrieb:
>> Masi: SQL_CALC_FOUND_ROWS is a keyword before field-definition, * was
>> only for example.
>
> Well, what column name do you suggest? t3lib_db works on any table, so
> it cannot rely on "uid".
>
> The more I think about SQL_CALC_FOUND_ROWS for this use case the less I
> like it.
>
i rereaded the description in MySQL Manual and it's different to my
remembering.
SQL_CALC_FOUND_ROWS is a special case for selects containing a limit
SELECT SQL_CALC_FOUND_ROWS * from table limit 10
SELECT FOUND_ROWS()
SQL_CALC_FOUND_ROWS calculates how many records it would be without
limit, second select will deliver this number, and this is faster as
calling the select again without limit.
So for the case of this issue forget about SQL_CALC_FOUND_ROWS.
vg Steffen
More information about the TYPO3-team-core
mailing list