I have one table reports, which contains all info and read reports which just has Report ID and ID (of owner of the report)
I'm trying to do this statment (correct me if theres better out there) so it gets all the reports ID from read reports which match ID 1, and pick out all the details from reports for it. (Report ID's are the same on reports and read reports)
But this statement is giving me back no rows:
SELECT a.*
FROM `Reports` AS a,
(SELECT `Report ID` FROM `Read Reports` WHERE `Id` = 1) AS b
WHERE a.`Report ID` = b.`Report ID`;
Whats wrong with it/how can I improve it?
Thanks,
EDIT: My bad, it works fine!! Id 1 had no reports. Close this. :L
EDIT2: Still post if you have improvements though :P