I'm developing a simple photo album project. I have one table that stores information about each photo (filename, format, size, etc.) and then a table of keywords. The keywords table looks like: [code] id INT primary key, keyword VARCHAR, photo_id INT [/code] Each keyword gets its own row in the table, even if multiple photos have the same keyword. Also, each photo can have multiple keywords that point to the same photo_id. I think this is a pretty standard setup. What I'm trying to do is something like SELECT * FROM photos WHERE keyword='keyword1' AND keyword='keyword2' -- that is, find all photos that have BOTH keyword1 and keyword2. I figured out a JOIN statement that does this for keyword1 OR keyword2, but am having trouble working one that does AND. Any ideas?