List:General Discussion« Previous MessageNext Message »
From:Eric Persson Date:February 20 2006 8:18am
Subject:Change on LEFT JOIN ON syntax in 5.x?
View as plain text  
Hi,

I have a query which works fine for me in my 4.1 environment, but when 
moved to the 5.0.18 environment, it fails with the result below:

mysql> SELECT r.uid, u.username, u.image_type, count(id) AS antal, 
s.timestamp FROM recruits_uid r, users u, users u2 LEFT JOIN sessions s 
ON s.uid=u.uid WHERE r.uid=u.uid AND r.rec_uid=u2.uid AND u2.deleted="0" 
AND datetime>"0000-00-00 00:00:00" GROUP BY r.uid ORDER BY antal DESC 
LIMIT 100;
ERROR 1054 (42S22): Unknown column 'u.uid' in 'on clause'
mysql>

It seems like the table alias u is not recognized for some reason. Does 
anyone have any hints about this?

Thanks in advance,
	Eric
Thread
Change on LEFT JOIN ON syntax in 5.x?Eric Persson20 Feb
  • Re: Change on LEFT JOIN ON syntax in 5.x?Pooly20 Feb
  • Re: Change on LEFT JOIN ON syntax in 5.x?Jan Pieter Kunst21 Feb
    • Re: Change on LEFT JOIN ON syntax in 5.x?SGreen21 Feb