Maybe a lame excuse but I need help because I have a horrible flu with a headache, watery eyes and a deadline. And JOINs have never been a strong suit of mine so after staring at this problem for 4 hours now I admit I need help.
I have 3 tables:
product id name type status
categories id parent cat
xref id catID prodID
I need to have a list of all the categories (can be doubles) of all products where status=X and type=Y
What I have sofar is:
SELECT * FROM xref AS x LEFT JOIN categories AS c ON x.catID = c.id LEFT JOIN product AS p ON x.prodID = p.id WHERE status = X AND type = Y;
But it does not seem to work as I expect? Can anyone help me out here please? Thank you.
Ok, never mind. There was nothing wrong with neither query, it was another stupid (no doubt flu related, yeah right) mistake later on in my code (I expected the result to be available before I executed it, lol).