There are currently three tables:
respectively: a B C
The relationship between a and B, A.uid = b.id
The relationship between B and C, B.uid = c.id
Now want to through a MySQL statement directly in the query a table, you can use the B table to find out the C table information, such as left join and so on, please God to give a demonstration SQL statement, thank you
Reply content:
There are currently three tables:
respectively: a B C
The relationship between a and B, A.uid = b.id
The relationship between B and C, B.uid = c.id
Now want to through a MySQL statement directly in the query a table, you can use the B table to find out the C table information, such as left join and so on, please God to give a demonstration SQL statement, thank you
The following is for reference only
SELECT * from A left join B on A.uid=b.id left join C on B.uid=c.id WHERE ...