and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
[syntax="sql"]
SELECT `CATEGORY`.`Name`,`INCENSE2`.*, `INCENSE_SIZE`.`QOH`,`INCENSE_SIZE`.`Price`,`SIZE`.`Name` FROM `INCENSE_SIZE`, `SIZE`, `INCENSE2` JOIN `CATEGORY` USING (CategoryID) WHERE `INCENSE2`.`PRODUCTID` = `INCENSE_SIZE`.`ProductID` AND `SIZE`.`SIZEID` = `INCENSE_SIZE`.`SIZEID` AND `INCENSE2`.`CategoryID` = `CATEGORY`.`CategoryID`
This obviously doesnt work. How would I do this? I have 4 tables. INCENSE2, CATEGORY, INCENSE_SIZE, SIZE. INCENSE2, INCENSE_SIZE and SIZE are a many to many relationship. I also need to join INCENSE and CATEGORY at CategoryID to prevent data replication.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]