|
Posted by Pierre on 11/15/06 06:27
Hi there,
I have an issue with several LEFT JOIN ... ON like the one postes below.
The query below executes correctly on MySQL 4.1.16-standard but fails on
the same tables on a 5.0.19-standard server.
erro: #1054 - Unknown column 'c.id' in 'on clause'
SELECT c.id, c.nom, c.prenom, t.Tickets
FROM clients c, inscriptions i
LEFT JOIN (
SELECT COUNT( * ) Tickets,
CLIENT FROM tickets
GROUP BY CLIENT
) AS t ON c.id = t.client
WHERE i.client = c.id
ORDER BY c.nom, c.prenom
I assume that there must have been changes between the two versions,
would any one help me hilighting the mistake I make ?
--
Pierre
Navigation:
[Reply to this message]
|