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msmc2hgcRe8Y3+2TrXB0z17iUHCEh/sCRDNApSI9qnFh0ORB7TD7sExWEBJebBi8QqvFO5DJb1KfqhL5x37bl1atbeDdccAl6eVHsy+sodzvtHB62efdAaeBPDkdxutjmPbY3TgkBKCok4QfQwrIsaZGiF8GVkmMBNsGMeGt6nEd6GVu/B4yrKrDJe+P987vo/KzTH0RLtIiYnccglAA2dSPIJhChdoh0kPR+LfyDmZgXLbq0izoVrNd5KlbYda6aixr8W/7YR8Iq1s7aMAmQxRb4UF7ewtKFS8SDW1dow9qIKZn/F9i923qXVgp4A=
1 - SELECT et.id, et.residence, et.bottin, et.emploi, et.msss, (eev.dateFin > NOW()) as vedette FROM emplois_temp et
LEFT JOIN envois_eer_emplois_vedette eev ON eev.emploi = et.id AND eev.dateFin > NOW()
LEFT JOIN residences r2 ON r2.id = et.residence WHERE et.bottin = AND (r2.emplois_masques != '1' OR r2.emplois_masques IS NULL) AND
((SELECT desapprouve FROM emplois e WHERE e.id = et.emploi AND e.datePublication <= NOW()) = '0')
AND (SELECT affiche FROM emplois e WHERE e.id = et.emploi AND e.datePublication <= NOW()) = '1'
AND (
et.residence in (select res_id from utilisateurs where res_id > 0)
OR
et.bottin in (select serv_id from utilisateurs where serv_id > 0)
OR
et.msss in (select msss_id from utilisateurs where msss_id > 0)
OR
r2.groupe in (select res_groupe_id from utilisateurs where res_groupe_id > 0)
)
GROUP BY et.id
LIMIT 100