Jump to content

Help with Query


Canman2005

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/204593-help-with-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.