[TYPO3-core] RFC: Bug #10099: Use TYPO3_DB->exec_SELECTcountRows() to determine the number of rows
Michael Stucki
michael at typo3.org
Fri Feb 27 17:35:25 CET 2009
Hi Benni & Olly,
not sure where the problem seems to be, but I think it's fine if you
just keep the existing code in superadmin.php. It is an external
component which is not used by BE and FE, so I think you better keep it
as is when in doubt.
- michael
Benjamin Mack schrieb:
> 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.
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-team-core
mailing list