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.
header('HTTP/1.1 420 Enhance Your Calm');