You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups G on E.id_group = G.id_group LEFT JOIN group_desc GD on E.id_group = ' at line 4