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? Quote Link to comment Share on other sites More sharing options...
codefossa Posted January 24, 2011 Share Posted January 24, 2011 SQL function JOIN Quote Link to comment 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"; 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.