Advice on searching multiple tables..
| From: | Chad Day | Date: | Mon, 14 Aug 2000 03:15:55 +0000 |
| Subject: | Advice on searching multiple tables.. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2024@lists.php.net to get a copy of this message | ||
Looking for a good way to do this.. I can think of an ugly way, but it
doesn't seem too efficient.
I am getting one value from a form and I need to search multiple tables to
see if this field matches.. the tricky part is I need to basically search
all the columns in all the tables for this value, and the column names
obviously aren't the same, and some tables have 5 columns, some have 15.
The ugly way I can think of is just one damn long mysql query, but that
seems like it would be REALLY slow. The other way I can think of is doing X
# of searches, where X is the number of tables.. so if I had 5, do 5
different searches.
Any better ideas?
Thanks,
Chad