[TYPO3-english] TYPO3_DB on TYPO3 v. 4.6.1
Jeppe Donslund
jeppe at donslund.net
Sun Dec 11 14:52:47 CET 2011
Hi
When trying to get data from the database in an extension, I use the
same code as I use to, but I get this error:
Fatal error: Call to undefined method t3lib_DB::sql() in ...
Are there any changes in TYPO3 v. 4.6.1? It is the first time I use that
version.
I use this code:
$query = $GLOBALS['TYPO3_DB']->SELECTquery(
'*', // SELECT ...
'tx_jdtttrash_trash', // FROM ...
'deleted = 0 AND hidden = 0', // WHERE...
'', // GROUP BY...
'tstamp', // ORDER BY...
'' // LIMIT ...
);
$res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db, $query);
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$content = '<div class="box">'.$row["title"].'</div>';
}
Regards
Jeppe Donslund
More information about the TYPO3-english
mailing list