I have 4 tables: table1, table2, table3, table4. table1 contains id values related to all other tables (2,3,4) and I would like to connect all of them to have all data in one set, I think it's simple relation.
I tried this, but I don't know why it doesn't work:
SELECT * FROM 'table1'
JOIN 'table2' ON 'table1.id_forT2'='table2.id'
JOIN 'table3' ON 'table1.id_forT3'='table3.id'
JOIN 'table4' ON 'table1.id_forT4'='table4.id'
WHERE 'table1.id' = 30
When I left only one join it works fine, with 2 or 3 joins it returns an error. How to do that? Thanks in advance