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Qvdt49XL+dhQqXhYYr3hUYdl/RF54fsbWkkNKz3pWTjBwE/D+etxe3RjYhNGeei3wwOI7VBkVKNnHi0D+0ppMCsdXFwRndNg8X8qiOjVlCf5GCvJ3xS5jnyiiYyDINgpuV/lKq8toR24ksEowU4Ma6jc6dog+I7orLS1lZHsDlv9tNu4GRjjcjOI1lb5HR1qFOdjDvL3JRk5B25v6pJlL+Uhmc8PcYk/e59D5JQAlopo1D/Xm+p5IPnpD0j+uVgmxEfRAK41HqGUpZvfoZyyV9nLGAD4FN+vdupAVTKHQk0rXbGokiSHxAspfAwSyBPPnzBYULkhtmzUyZyqP+ImlEQFuFXbKOLky/tJ65Oq8T5er7XGpGRToFYZGS6EiXibxAkc3opTz7PUmSxJkGCXIQznRZIKdD0hW2R1sq4IwjWqNRo6GS7sDb9sIqVjD91W6tp1PuMXmpHHe9bFVWnkevGFdr9dhSIvy6BtahYqQrZHBUG5G3IVvh2iGs7L9+3GlwDJ332POAQb6Ug371adb2jwowD7W8jSM3540zCpbqrkjcHJqvt7xQMnsIfQCi5YqB/5Q+qGgywbwaaaRmYwx3LIbJRZMhX2Z/V2Wno5J4ceC/9bPQ4981vUV0GhIWlFjzO9FTEejnkrtc19zQ=
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 (SELECT groupe FROM residences r WHERE r.id = et.residence AND r.emplois_masques = '0') = AND (SELECT confidentiel FROM emplois e WHERE e.id = et.emploi AND e.datePublication <= NOW()) = '0' 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
ORDER BY (SELECT datePublication FROM emplois e WHERE e.id = et.emploi) DESC LIMIT 100