[TYPO3-dev] DBAL and JOIN Query

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Dec 13 15:05:09 CET 2006


Stefan Bothner | [m]zentrale schrieb:
> Hi folks,
> 
> i try to get a Query to run under DBAL.
> If i check my Query under DBAL Debug i get following
> error:
> 
> SQL engine parse ERROR: No table name found as expected in
> parseFromTables()!: near "((tx_mzcbpaquisition_liste INNER JOIN
> tx_mzcbpaqui"
> 
> If i try this Statement in PHPMyAdmin (MySQL) it works fine.
> 
> Here's the Query:
> 
> SELECT DISTINCT tx_mzcbpaquisition_liste.*,
> tx_mzcbpaquisition_cbpsparte.farbehex AS farbe
> FROM 
> ((tx_mzcbpaquisition_liste INNER JOIN tx_mzcbpaquisition_cbpsparte ON
> tx_mzcbpaquisition_cbpsparte.uid = tx_mzcbpaquisition_liste.cbpsparte_uid)
> INNER JOIN tx_mzcbpaquisition_cbpprojektstatus ON
> tx_mzcbpaquisition_liste.cbpprojektstatus_uid=tx_mzcbpaquisition_cbpprojekts
> tatus.uid)
> WHERE 
> (tx_mzcbpaquisition_liste.projektname LIKE '%demo%' OR
> tx_mzcbpaquisition_liste.institution LIKE '%demo%' OR
> tx_mzcbpaquisition_liste.anmerkung LIKE '%demo%') AND
> tx_mzcbpaquisition_liste.deleted=0 AND tx_mzcbpaquisition_liste.hidden = 0
> ORDER BY tx_mzcbpaquisition_liste.projektname

Maybe the parser doesn't like the extra brackets around the from clause. 
Syntactically "FROM (x)" is the same as "FROM x".

Masi




More information about the TYPO3-dev mailing list