OriginalBoy Posted August 30, 2008 Share Posted August 30, 2008 Hey, I need to search different tables and find any results that are the same in both. This can be done by searching and checking if any email is in all i have requested. Is this possible? How? Thanks in advance Quote Link to comment Share on other sites More sharing options...
Barand Posted August 30, 2008 Share Posted August 30, 2008 The way to find matches between two tables is a query using an inner join. Quote Link to comment Share on other sites More sharing options...
OriginalBoy Posted August 30, 2008 Author Share Posted August 30, 2008 any clue how to do this I cnt find much on the unternet Quote Link to comment Share on other sites More sharing options...
Hooker Posted August 30, 2008 Share Posted August 30, 2008 http://dev.mysql.com/doc/refman/5.0/en/join.html Quote Link to comment Share on other sites More sharing options...
Barand Posted August 31, 2008 Share Posted August 31, 2008 any clue how to do this I cnt find much on the unternet your right, there isn't much out there , not even quarter of a million matches http://www.google.co.uk/search?q=SQL+JOIN+tutorial Quote Link to comment Share on other sites More sharing options...
OriginalBoy Posted August 31, 2008 Author Share Posted August 31, 2008 I've been looking through tutorials and here is what i have got... SELECT email FROM design3 INNER JOIN flash3 ON first_table.keyfield = second_table.foreign_keyfield this dnt seem to be working i got this guide from w3schools any advice, and can I join like 3 or 4 together to search through Quote Link to comment Share on other sites More sharing options...
Barand Posted August 31, 2008 Share Posted August 31, 2008 Firstly, your tables are "email" and design3" and not "first_table" and "second_table". Secondly, unless those tables do contain columns called "keyfield" and "foreign_keyfield", what exactly are you trying to match on? Quote Link to comment Share on other sites More sharing options...
OriginalBoy Posted August 31, 2008 Author Share Posted August 31, 2008 I shud of explained, email is the column and flash3 and design3 is the tables. Quote Link to comment Share on other sites More sharing options...
Barand Posted August 31, 2008 Share Posted August 31, 2008 SELECT design3.email FROM design3 INNER JOIN flash3 ON design3.email = flash3.email Quote Link to comment Share on other sites More sharing options...
OriginalBoy Posted September 1, 2008 Author Share Posted September 1, 2008 this works thank you! Quote Link to comment 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.