jmastromauro Posted April 29, 2008 Share Posted April 29, 2008 Server version: 4.1.22-standard + PHP 4.7 I am trying to find something that is in either on table or the other with one querey: SELECT country.counName, location.locaName, location.locaShortName FROM country,location WHERE country.counAbbreviation='$sub_text' OR location.locaAbbreviation='$sub_text'"; The $sub_text is an abbreviation that will occur in only one of the tables. First time I have tried this... I am not sure how to do it..... It would seem to me that it could be done in one query. Link to comment https://forums.phpfreaks.com/topic/103486-searching-for-an-item-that-exists-in-either-table-a-or-table-b/ Share on other sites More sharing options...
atticus Posted April 29, 2008 Share Posted April 29, 2008 are you getting an error? Link to comment https://forums.phpfreaks.com/topic/103486-searching-for-an-item-that-exists-in-either-table-a-or-table-b/#findComment-529893 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.