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NZO3GEl8PxtQIrHDt/uvkANPlwmnr3L1K2cn+nkXxC6UKWhcUjSzEZMIU6pSM6wRvu/iJCrzkMjaswBdyQxe5NlbeWF9YVsbv8f8a/Zk/g3rg1mhbzKTvy79FpLZoKKMN1u5rUTkgiRJq28MEiyP0pBQanwqB+XlERfAkiRP4yKad/82BZiBmLBxYeWQ9bgvzA6eanp095hLkelsCj/w7+6kB1giFqx651ZfVRHwqoq1HZVbkHDKNATByQuBpapQLNV/sn7Cl9pmDnRHwXO4o4epf/pq43DgQzD7W4=
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