I would like to do a multiple select in mysql but have not had any joy. I have tried following examples on here and around the web but they do not seam to fit what I am trying to do.
My select statement is as follows
SELECT a.* FROM Calendar a
WHERE a.CalendarId = 256 AND a.Private = 0
UNION
SELECT b.* FROM Calendar b
WHERE b.CalendarId = 256 AND b.Private = 1 AND b.PrivateId = 11
To explain what I want above, I would like to return all Calendar rows that have a Private value of 0.
I would also like to filter this by selecting only those that have Private = 1 that have the PrivateId = 11 (in this example).
Thanks
Try :