MYSQL QUERY LEFT JOIN SHOW ALL DATA FROM ONE TABLE -


select  a.code, b.note, c.number  (a left join b on a.code = b.code left join c on a.code = c.number )  c.id = b.id  

need show results combined 3 tables, results show data table b reported if data isn't real table c.

table a.code 1 2 3  table b.code 1 2 3  table b.note pippo  paperino pluto  table c.number 1 

ideally there should 1 result showing

1  1    pippo 

but in results shown:

1  1    pippo 1  1    paperino 1  1    pluto 

how can real data?

select  a.code, b.note, c.number  inner join b on a.code = b.code inner join c on a.code = c.number 

no need cluse


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -