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yRBHsKHUeXffQPzObhEgofHwu9yChZxFRepnFm72SzpefbVP86OcQ4TPBGLfR4e4zzDgdPsHbgPrh3nqWLXPsmXyp/+2Bd7zqXPu+ahnbP99IOt65lpfj1Wf80kbn2tYuXZBmRcU00ZtvF9naatJXJAp5JABC7Ve/nst6NlYGByQo8eqD2X3GPD1IKSjLYqfBN+dCDl3IZrX0KBSINNrJyJPJ5ryd7R38KyTH1+IQ43ESZ+TemC3H91/um/8Ipw6HbsCFJZSpq4jm7KUQ05Kv0zRltAwj7M/6FGH5u537AnjFEO0=
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