[TYPO3-dev] DBAL and JOIN Query
Stefan Bothner | [m]zentrale
stefan at m-zentrale.de
Wed Dec 13 13:12:53 CET 2006
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
Using this Qurey no Error is thorwn at DBAL Debug:
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
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
Wheres the problem, syntax is correct, or isn't it.
Kind regards
Stefan
More information about the TYPO3-dev
mailing list