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ejBBMeih+L5KZyBp01XK/d7UqE8ztxazThlGD9dFBYkoKX3NzX3elX4P41q1MrEL3yDQSx94MDJhxTiURU7wSkUhI5O8M6ghTa74xEkcSClo4ihXst9OJkphFk9wG0Mk8jETgw0bglmu8CGoulEBl/Sf/lLiv3bKa7/H5cPS9XtPCwW12kv7CjWsuPNEowN4YSxXPDUpWEgFGcZxXf39SKiRUkfYdphteOcKZJ6R/OD6KWfL/OyQYl/C+yebIdUwtWwjBwFZn+7cadZhJxfFUjcvCjR79jInTb8BScGhFWnBIMQ/Wb8OMWwfik3JNPE=
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