Best method to search to two tables?
I wanted to make a search module that searches two tables, is it possible with only one query? I also thought of maybe dumping the tables, then just make a loop to search through it. Is it a wise idea?
Any suggestions? Thanks!
SQL's job is to search. Don't give that burden to PHP since its a lot slower, so it would be very unwise to select an entire table's recordset and then use PHP to search it.
You can search multiple tables either by using a join, or by using a union. Haven't a clue what you are searching for, so cannot suggest either or.
|All times are GMT +1. The time now is 03:42 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.