Not sure how well I'm going to explain this - but here goes.
At the moment I have a table for 'Photos' and a table for 'Keywords' and a linking table PhotoKeywords.
It's a many to many relationship in that any photo can have many keywords, and any keyword can be associated with many photos.
The keywords are currently 'attached' to any given photo using numbered checkboxes.
What I want to be able to do now is search for photos based on the keywords associated with each.
If that makes sense, what is the best way to search for these records?
I had wondered if I might need to create a 'keywords' field that is populated with any attached keywords, and simply search in that field?
Hope that makes sense, and someone can point me in the right direction.
Cheers,
Best way to search for....?
Moderator: General Moderators
I'm assuming this is mysql? you need to read up on table joins... why is this in PHP code? Isn't this an SQL question? (database)
Sorry, yes - wrong forum.The Ninja Space Goat wrote:I'm assuming this is mysql? you need to read up on table joins... why is this in PHP code? Isn't this an SQL question? (database)
If a mod could move it that would be great.
Cheers.
iain wrote:Sorry, yes - wrong forum.The Ninja Space Goat wrote:I'm assuming this is mysql? you need to read up on table joins... why is this in PHP code? Isn't this an SQL question? (database)
If a mod could move it that would be great.
Cheers.
Moved to Databases
