How can you use mysql and the like/wildcard syntax across multiple tables, would it be as simple as:
(SELECT * FROM `table1` WHERE `name` LIKE '%tom%') AND (SELECT * FROM `table2` WHERE `name` LIKE '%sam%')
Not tested, just thinking about it.
If your tables have the same structures, you can use UNION:
SELECT * FROM `table1` WHERE `name` LIKE '%tom%' UNION SELECT * FROM `table2` WHERE `name` LIKE '%sam%'