12-07-2007, 08:07 PM
|
#11 (permalink)
|
|
The Contributor
Join Date: Oct 2007
Location: US
Posts: 66
Thanks: 19
|
Quote:
Originally Posted by Wildhoney
Sorry, completely missed your last question, Gurnk! Basically it's all down to the JOINs: - Join picture.id to picture_categories.id based on
WHERE clause (one to many);
- Join picture_categories.category_id to categories.id (many to many);
Key:
Blue = Table
Green = Column
So for every ID that matches to the picture's image in our lookup table, get all the IDs that match up to a categories in the categories table.
|
Ah nice one! I didn't know you could do stuff like table.column. Thanks for the tips. 
|
|
|