because the title states, I'm attempting to query multiple mySQL tables within the same DB concurrently, here's my query,
SELECT * FROM `database_db`.`one, two, three, four, five, six, seven` WHERE uid='1234567'
I'm using mySQL work bench to complete the query, however when I run it I recieve this error
Error Code: 1103 Incorrect table name 'one, two, three, four, five, six, seven'
I understand the problem lies with my query, where I choose the tables, I'm presuming which i cannot choose several, or possibly my syntax is incorrect?
Can there be one other way that i can attain the same result?
EDIT: Each table differs, each one has another quantity of posts, the only real factor they share may be the uid.
For example, table you have the posts "oneA, oneB, oneC" and table two has got the posts "twoA, twoB, twoC, twoD, twoE", and so forth and so on for every table, as you can tell they don't have the equivalent posts, and therefore are by no means just like one another.
Thanks ahead of time.
You most likely wish to JOIN the tables:
SELECT * FROM one JOIN two ON one.uid = two.uid JOIN three ON one.uid = three.uid WHERE one.uid='1234567'
IF table structure is similar for tables: one, two, three ... you'll be able to use UNION
SELECT * FROM one WHERE uid='1234567' UNION ALL SELECT * FROM two WHERE uid='1234567' UNION ALL SELECT * FROM three WHERE uid='1234567' .... UNION ALL SELECT * FROM seven WHERE uid='1234567'
Maybe I do not comprehend the question perfectly but how about something similar to this:
SELECT * FROM table_a a, table_b b, table_c c WHERE a.uid = b.uid = c.uid = 12345;