[SOLVED] Frustrated with mySQL docs.
Posted: Sun Jul 18, 2004 6:30 pm
They aren't very clear to me.
I have a table with accessories and a table with products.
Then I have a third table that just has entries that crossreference what accessories will work with what products.
I let the user choose some other options held in the accessory table, but then I want them to be able to choose to get only the accessories that work with their products.
Seems simple enough, but I cant't get it to work right..
It returns a bunch of rows even though there are only two accessories in the DB right now!
If someone could point me to a good tutorial on multiple table selects, that would greatly be appreciated. I understand the basics and I can usually hack my way though things, but this has me stumped. Whats weird is in another set of tables I did something similar and it seemed to work..so I don't get it.
Thanks,
Mike
I have a table with accessories and a table with products.
Then I have a third table that just has entries that crossreference what accessories will work with what products.
I let the user choose some other options held in the accessory table, but then I want them to be able to choose to get only the accessories that work with their products.
Seems simple enough, but I cant't get it to work right..
Code: Select all
SELECT * FROM accessory, productlist WHERE accessory.acc_type = "some type" AND ((productlist.accessory_id = accessory.accessory_id) AND (productlist.prod_id = "123" OR "111"))If someone could point me to a good tutorial on multiple table selects, that would greatly be appreciated. I understand the basics and I can usually hack my way though things, but this has me stumped. Whats weird is in another set of tables I did something similar and it seemed to work..so I don't get it.
Thanks,
Mike