change from an OR to an AND condition

2011-09-27 Thread Simon Wilkinson
Hi, I have a query where I'm using a left outer join to connect two tables, entries and entries_tags, where entries_tags is a join table between entries and another table, tags. In my query I am selecting values from the entries table where the entries have any of the provided tags - WHERE

Re: change from an OR to an AND condition

2011-09-27 Thread Simon Wilkinson
Just to clarify, here is some more info: Here is what the query looks like: SELECT DISTINCT `entries`.id FROM `entries` LEFT OUTER JOIN `entries_tags` ON `entries_tags`.entry_id = `entries`.id LEFT OUTER JOIN `tags` ON `tags`.id = `entries_tags`.tag_id WHERE (`entries_tags`.tag_id IN (5,6)); So