1 - SELECT et.id, et.residence, et.bottin, et.emploi FROM emplois_temp et LEFT JOIN residences r2 ON r2.id = et.residence WHERE ((SELECT ville FROM residences r WHERE r.id = et.residence AND r.emplois_masques = '0') = 'L'Épiphanie' AND (SELECT pasDeResidence FROM emplois e WHERE e.id = et.emploi AND e.datePublication <= NOW()) = '0') OR ((SELECT COUNT(*) FROM emplois e2 LEFT JOIN bottin b ON e2.bottin=b.id WHERE b.id = et.bottin AND e2.ville = 'L'Épiphanie' AND e2.id = et.emploi AND e2.datePublication <= NOW()) > 0) AND (r2.emplois_masques != '1' OR r2.emplois_masques IS NULL) AND (SELECT approuve FROM emplois e WHERE e.id = et.emploi AND e.datePublication <= NOW()) = '1' AND (SELECT affiche FROM emplois e WHERE e.id = et.emploi AND e.datePublication <= NOW()) = '1' ORDER BY (SELECT datePublication FROM emplois e WHERE e.id = et.emploi) DESC