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?
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.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php