[TYPO3-dev] Tip: use SQL function COUNT(*)
Steffen Kamper
steffen at sk-typo3.de
Fri Jul 18 12:39:52 CEST 2008
Ingo Renner schrieb:
> Martin Kutschker wrote:
>
>> Anyway it's better to use this:
>>
>> $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('COUNT(*)', 'tx_table');
>
> $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('COUNT(uid)', 'tx_table');
>
> ;)
>
>
i tested this and it makes no difference
COUNT(*) or COUNT(field) is internally the same
vg Steffen
More information about the TYPO3-dev
mailing list