[TYPO3] inner join 3 or more tables with typo3 db functions
Mauro Lorenzutti
mauro.lorenzutti at webformat.com
Tue Jan 30 11:48:58 CET 2007
Hi peter,
> I need to make mysql query with inner join of three or more tables.
> How can be this done with the typo3 db function exec_SELECTquery(...) ?
> i.e
> SELECT table1.*
> FROM table1
> INNER JOIN table2 ON id1=fk2
> INNER JOIN table3 ON id2=fk3
> WHERE ...
> ORDER BY ...;
$GLOBALS['TYPO3_DB']->exec_SELECTquery('table1.*', 'table1 INNER JOIN
table2 ON id1=fk2 INNER JOIN table3 ON id2=fk3', '...', '', '...');
Have you tried this way?
But I'm not sure that this is supported by dbal...
Regards,
Mauro Lorenzutti
e-mail: mauro.lorenzutti at webformat.com
---------------------------------------------------------
WEBFORMAT srl | Corte Europa, 12 | I-33097 SPILIMBERGO PN
Tel +39-0427-926.389 -- Fax +39-0427-927.653
info at webformat.com -- www.webformat.com
---------------------------------------------------------
More information about the TYPO3-english
mailing list