views:

13

answers:

1

Hi,

I use Zend_Db_Select to perform a query with a Join. I end up with the following SQL query :

SELECT `Utilisateur`.*, `Ressource`.*, `Acl_Cache`.*, `Role`.*, `UtilisateurRole`.* FROM `Utilisateur`
INNER JOIN `Ressource` ON Ressource.idJointure = Utilisateur.id
INNER JOIN `Acl_Cache` ON Acl_Cache.idRessource = Ressource.id
INNER JOIN `Role` ON Role.id = Acl_Cache.idRole
INNER JOIN `UtilisateurRole` ON UtilisateurRole.idRole = Role.id
WHERE (Ressource.tableJointure = 'Utilisateur') AND (UtilisateurRole.idUtilisateur = '2')

Why is Zend_Db adding this part is the SELECT clause :

, `Ressource`.*, `Acl_Cache`.*, `Role`.*, `UtilisateurRole`.*

I never asked this, and I don't want that. How to prevent this behavior ?

A: 

Try removing the character `

Madhivanan
What ? What are you talking about, I am using Zend_Db_Select to construct the query, I'm not writing raw SQL
Matthieu