1

I'm trying to search for one value against 3 tables e.g.

user searches for 'test'

'test' needs to be a where clause for 3 tables. I could do it like:

SELECT * FROM `table1` WHERE `field` = "test";
SELECT * FROM `table2` WHERE `field` = "test";
SELECT * FROM `table3` WHERE `field` = "test";

but that seems like it could be simplified, any thoughts? Not searching information_schema for data.

Thanks

treyBake
  • 6,440
  • 6
  • 26
  • 57
  • Possible duplicate of [Search in all fields from every table of a MySQL database](http://stackoverflow.com/questions/639531/search-in-all-fields-from-every-table-of-a-mysql-database) – mayersdesign Mar 29 '17 at 12:16

0 Answers0