zMastaa Posted December 28, 2009 Share Posted December 28, 2009 I have two tables that have identical fields with the same data within them Table A UserIDLinkedID 1500 1501 1502 1503 1504 1505 1506 1507 1508 2505 2506 2507 2508 Table B UserIDLinkedID 1505 1506 1507 1508 2505 2506 2507 2508 I just need a solution as to how i will be able to distinguish what row has been deleted from Table A compared to Table B Any Help? Link to comment https://forums.phpfreaks.com/topic/186534-a-little-bit-of-join-help-needed/ Share on other sites More sharing options...
Mchl Posted December 28, 2009 Share Posted December 28, 2009 This will give you a list of all linkedID that are in tableB but are not present in tableA. SELECT tableB.linkedID FROM tableB LEFT JOIN tableA USING (linkedID) WHERE tableA.linkedID IS NULL Link to comment https://forums.phpfreaks.com/topic/186534-a-little-bit-of-join-help-needed/#findComment-985150 Share on other sites More sharing options...
zMastaa Posted December 28, 2009 Author Share Posted December 28, 2009 What if i just want it to check for UserID = 1? do i add that to the Where parameter? Link to comment https://forums.phpfreaks.com/topic/186534-a-little-bit-of-join-help-needed/#findComment-985160 Share on other sites More sharing options...
Mchl Posted December 28, 2009 Share Posted December 28, 2009 Try and see Link to comment https://forums.phpfreaks.com/topic/186534-a-little-bit-of-join-help-needed/#findComment-985162 Share on other sites More sharing options...
zMastaa Posted December 28, 2009 Author Share Posted December 28, 2009 If i could see u irl i would kiss you right now LOL thanks alot Link to comment https://forums.phpfreaks.com/topic/186534-a-little-bit-of-join-help-needed/#findComment-985163 Share on other sites More sharing options...
Mchl Posted December 28, 2009 Share Posted December 28, 2009 I really hope you're female. Link to comment https://forums.phpfreaks.com/topic/186534-a-little-bit-of-join-help-needed/#findComment-985164 Share on other sites More sharing options...
zMastaa Posted December 28, 2009 Author Share Posted December 28, 2009 Nope lol! , how do i mark this as solved? Edit: Nvm Link to comment https://forums.phpfreaks.com/topic/186534-a-little-bit-of-join-help-needed/#findComment-985166 Share on other sites More sharing options...
Mchl Posted December 28, 2009 Share Posted December 28, 2009 Awww... call me old fashioned, but being kissed by a guy makes me feel uneasy Link to comment https://forums.phpfreaks.com/topic/186534-a-little-bit-of-join-help-needed/#findComment-985167 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.