MySQL 'OR' not working
I want to do this query: `SELECT * FROM mail WHERE tag_draft=0 AND (target_id=2 OR source_id=2) GROUP BY created DESC`, but it returns no rows. Now, if I do this query: `SELECT * FROM mail WHERE tag_draft=0 AND target_id=2 GROUP BY created DESC` then it works fine - every row with a `target_id` of 2 is selected. If I substitute `target_id` with `source_id`, it works fine too. The thing is, I want to select rows where the target **OR** source ID is 2 (2 used as an example here), however running the query first stated (`SELECT * FROM mail WHERE tag_draft=0 AND (target_id=2 OR source_id=2) GROUP BY created DESC`), with or without inner brackets, returns no rows. I cannot figure out why this will not work, other than I'm doing something wrong with the OR bit. 

Thanks,

James
MySQL 'OR' not working
===

I want to do this query: `SELECT * FROM mail WHERE tag_draft=0 AND (target_id=2 OR source_id=2) GROUP BY created DESC`, but it returns no rows. Now, if I do this query: `SELECT * FROM mail WHERE tag_draft=0 AND target_id=2 GROUP BY created DESC` then it works fine - every row with a `target_id` of 2 is selected. If I substitute `target_id` with `source_id`, it works fine too. The thing is, I want to select rows where the target **OR** source ID is 2 (2 used as an example here), however running the query first stated (`SELECT * FROM mail WHERE tag_draft=0 AND (target_id=2 OR source_id=2) GROUP BY created DESC`), with or without inner brackets, returns no rows. I cannot figure out why this will not work, other than I'm doing something wrong with the OR bit. 

Thanks,

James