MySQL Join Problem (PHP)

Solved
.... -  
 ..... -
Hello, so I have 5 tables in my database and I need to display all 5 tables with a single query (SQL join), how can I do that? Please help me. Thank you.

1 réponse

Exileur Posted messages 1621 Registration date   Status Membre Last intervention   150
 
Hello,

The "union" function should solve your problem:

SELECT last_name, first_name
FROM Table1
UNION
SELECT last_name, first_name
FROM Table2;

Best regards
Exileur
--
Don’t forget to mark your post as resolved when you have received answers to your questions...
In the land of the blind, the one-eyed are kings.
0
.....
 
Hello, thank you for your response. Is it mandatory to do it on several lines?
0
chedar Posted messages 106 Status Membre 3
 
Vous pouvez le faire sur une seule ligne.
0
Exileur Posted messages 1621 Registration date   Status Membre Last intervention   150
 
And don't forget to mark your post as resolved :)
0
.....
 
Alright, thank you very much.
0