[TYPO3-core] RFC: Bug #10099: Use TYPO3_DB->exec_SELECTcountRows() to determine the number of rows

Benjamin Mack benni at typo3.org
Fri Feb 27 12:01:59 CET 2009


Hey Olly,

I don't think that the DB should be changed here:

On 16.02.2009 16:13 Uhr, Oliver Hader wrote:
>   		$DB = $this->globalSiteInfo[$key]['siteInfo']['TYPO3_db'];
>
>   			// Non-admin users
> -		$query = $GLOBALS['TYPO3_DB']->SELECTquery('count(*)', 'be_users', 'admin=0 AND deleted=0');
> -		$res = mysql($DB, $query);
> -		$row = mysql_fetch_row($res);
> -		$this->globalSiteInfo[$key]['siteInfo']['BE_USERS_NONADMIN'] = $row[0];
> +		$this->globalSiteInfo[$key]['siteInfo']['BE_USERS_NONADMIN'] = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
> +			'*',
> +			'be_users',
> +			'admin=0 AND deleted=0'
> +		);

We should provide a SELECTcountRows() probably, and then we can make the 
mysql() call there with the external DB.

All the best,
Benni.


More information about the TYPO3-team-core mailing list