scotchegg78 Posted December 24, 2009 Share Posted December 24, 2009 Hi Guys Easy one, but maybe i am tired or full of cold, but my query is wrong??! i am simply trying to check two tables to see if the email has already been registered. But it returns nothing if one of the tables for example job seeker is empty, even though the required email is in the recruiter table already.. SELECT job_seeker.email,job_recruiter.email FROM job_seeker,job_recruiter WHERE (job_recruiter.email = '[email protected]') OR (job_seeker.email = '[email protected]'); thanks for any quick fix Link to comment https://forums.phpfreaks.com/topic/186253-check-two-tables-for-email/ Share on other sites More sharing options...
fenway Posted December 27, 2009 Share Posted December 27, 2009 That's because it's an inner join -- you want UNION. Link to comment https://forums.phpfreaks.com/topic/186253-check-two-tables-for-email/#findComment-984602 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.