QueryBuilder

select 'client' as statut FROM emplois_temp WHERE

((SELECT u.id FROM utilisateurs u LEFT JOIN residences r ON u.res_groupe_id = r.groupe WHERE r.id = emplois_temp.residence AND u.relation = 'client' LIMIT 1) IS NOT NULL OR (SELECT u.id FROM utilisateurs u WHERE u.res_id = emplois_temp.residence AND u.relation = 'client' LIMIT 1) IS NOT NULL OR (SELECT u.id FROM utilisateurs u WHERE u.serv_id = emplois_temp.bottin AND u.relation = 'client' LIMIT 1) IS NOT NULL)

AND id =

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 '' at line 5