Canman2005 Posted June 12, 2010 Share Posted June 12, 2010 Hi all Just wondering if someone can help me with with my SELECT query SELECT b.name, (SELECT value FROM options WHERE id = bc.level1) AS l1, (SELECT value FROM options WHERE id = bc.level2) AS l2, (SELECT value FROM options WHERE id = bc.level3) AS l3 FROM items b LEFT JOIN cats bc ON b.id = bc.item_id WHERE l3 = 'Apple' AND l3 = 'iPod' AND l3 = 'Touch' as I keep getting a #1054 - Unknown column 'l3' in 'where clause' But I cannot figure it out Any help would be great Thanks Quote Link to comment Share on other sites More sharing options...
Canman2005 Posted June 12, 2010 Author Share Posted June 12, 2010 Any ideas anyone? Quote Link to comment Share on other sites More sharing options...
fenway Posted June 15, 2010 Share Posted June 15, 2010 "l3" is a table alias -- not a column. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.