your join looks weird.
you are saying 6 tables but actually using 9
as per your code
select * from table1
inner join table2 on table1.id = table3.id
may i know why table1 is joined with table2 on table3.id ?
NOTE:-- There should be at least n-1 number of joins for joining n number of tables.