[Typo3-dev] Nested Queries in MySQL wrapper class
Joel Faucett
faucett at fidnet.com
Thu Jul 15 17:39:32 CEST 2004
Hello all-
How does one implement nested queries in the wrapper functions? e.g.
I want to get the 5 most recent items sorted by title, but the following
code returns an empty result. Is it an SQL error that I'm not seeing or
have I structured it incorrectly?
$innerQuery = 'SELECT uid FROM tx_tekresearch_sum ORDER BY crdate DESC
LIMIT 5';
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'*', // SELECT ...
'tx_tekresearch_sum', // FROM ...
'uid IN ('.$innerQuery.')', // WHERE...
'', // GROUP BY...
'title', // ORDER BY...
'' // LIMIT ...
);
On a side note, this is my first project with Typo3 and I look forward
to developing more as I get more proficient.
Thanks in advance,
Joel Faucett
More information about the TYPO3-dev
mailing list