One of the parameters my PHP page accepts is a user-search query. The application then takes that query and performs >100 separate SELECT statements that look exactly like the following:
SELECT * FROM table1 WHERE user = 'query';
SELECT * FROM table2 WHERE user = 'query';
SELECT * FROM table3 WHERE user = 'query';
SELECT * FROM table4 WHERE user = 'query';
...etc...
Is there a faster/more efficient way to do what I'm trying to do? E.g. by combining all of the select statements into one statement somehow? I feel like having 100 individual queries going to my database would be slower than one large query. I do not know how to combine them though, please help me.