mysql compare tables -


I am stuck with some tables in mysql How to include information from three tables does not really know very grateful if someone Thanks can help me


It's what I have:

Table1.Users

  + ---- + ------ - + -------------- + | ID | Name | Last name | + ---- + -------- + -------------- + | 1 | Peter | Elk | | 2 | Amy | Lee. | 3 | James | Ride | | 4 | Andrea | Thompson | + ---- + -------- + -------------- +  

Table 2. Project

  + ----- + ------------- + | ID | Name | + ----- + ------------- + | 13. Lmental | | 26 | Comunica | | 28 | Exabyior | | 49 | PuPPunient + ----- + ------------- +  

table 3.suser_profix

  + --- - ------ + ------------- + | ID_User | Id_project | + ---------- + ------------- + | 1 | 13. | 1 | 28 | | 2 | 13. | 2 | 28 | | 2 | 49 | | 3 | 28 | | 3 | 49 | | 4 | 49 | + ---------- + ------------- +  

And I would like to print something like this:

  + -------- + -------------- + ------------------ ---------------- + | Name | Last name | Project | + -------- + -------------- + ------------------------- --------- + | Peter | Elk | Little, Excalier | | Amy | Lee. Limittle, Iqbalier, Puignant. | James | Ride | Iqbalier, Puignant | | Andrea | Thompson | PuPPunient + -------- + -------------- + ------------------------- --------- +  

something like that ...

  select user.name, user.name, projects. By name (user, projects, usropropages) WHERE Users_Projects.id_users = Users.id and Users_Projects.id_projects = Projects.id ORDER BY ...  

... a single user / project copy The line will produce, which will make you manipulate your chosen language.

Trying to do constants, etc. is moving forward in a very scary query in SQL.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -