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 Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/ 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. Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-629991 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 Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-630007 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 Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-630010 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 Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-630037 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 Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-630059 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? Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-630063 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. Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-630077 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 Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-630294 Share on other sites More sharing options...
OriginalBoy Posted September 1, 2008 Author Share Posted September 1, 2008 this works thank you! Link to comment https://forums.phpfreaks.com/topic/122040-solved-finding-duplicate-results/#findComment-631210 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.