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 = 'test@email.com') OR (job_seeker.email = 'test@email.com'); thanks for any quick fix Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.