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jrHB12NlPiGt+7FxV8jou34wavyZvwF+MEuGZT+AT8o5BsIg5SAnBhhjULgSH6btV1PTIEok7wOX8iyaYiqzNZ7KBTqBK4cV28GO2qT4GKTPxyJzbuJt0aAS9TsZsjcrpkTKkzc3YuON6vaKWj6rh8DNfSZ+alZfjxeVAYTr4HuwB5Q9/kP0NU+vBGMc2EuJ7YY9960jES8VpRGZa0ePPE4FGk0MdYw1nyiRfYdO9lcersDGPM/YdTJ6yn1IrGGC7HD/vtgeThEOWhOdiCDgP3eEprwYpx6/qzaNFHUpXQQVo=
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