lukep11a Posted January 24, 2011 Share Posted January 24, 2011 Hi, does anybody know whether it is possible to search 2 tables from a database at once? Link to comment https://forums.phpfreaks.com/topic/225562-searching-2-tables-at-the-same-time/ Share on other sites More sharing options...
codefossa Posted January 24, 2011 Share Posted January 24, 2011 SQL function JOIN Link to comment https://forums.phpfreaks.com/topic/225562-searching-2-tables-at-the-same-time/#findComment-1164715 Share on other sites More sharing options...
lukep11a Posted January 24, 2011 Author Share Posted January 24, 2011 Thanks, so if I wanted to search two tables where a particular row from each table was equal to the query and then display results from both tables how would i go about that, I have this code which i know is incorrect but it may help you to understand what i am after.. $query = "SELECT * FROM names, directory WHERE names.surname, directory.surname LIKE \"%$trimmed%\" ORDER by surname"; Link to comment https://forums.phpfreaks.com/topic/225562-searching-2-tables-at-the-same-time/#findComment-1164730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.