[TYPO3-english] FOUND_ROWS() does not work

Vahan Amirbekyan vamirbekyan at dgfoundation.org
Fri May 22 19:45:51 CEST 2009


This is my code that always returns zero for $this->totalRows
I am using 4.2.6 and am NOT using pconnect. My DB and application boxes 
are separate.

$GLOBALS['TYPO3_DB']->sql_query('START TRANSACTION');
$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($field, $table, $where, 
'pages.uid', $orderBy, $limit);
$countRes = $GLOBALS['TYPO3_DB']->sql_query("SELECT FOUND_ROWS() as count");
$countRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($countRes);
$this->totalRows = (!empty($countRow)) ? $countRow['count'] : 0;
$GLOBALS['TYPO3_DB']->sql_query('COMMIT');


More information about the TYPO3-english mailing list