0 Listings
SELECT * from usersannonces WHERE DATEDIFF(NOW(),datefin) > 2 ORDER BY idannonce DESC
SELECT SQL_CALC_FOUND_ROWS an.*, ag.telephone, ag.telephone2, ag.mobile, ag.url, qu.nom AS quartier_nom, (SELECT COUNT(*) FROM `agences_annonces_recommande` AS anr WHERE anr.ida = an.idag AND anr.idan = an.idan) AS anrecommande, (SELECT COUNT(*) FROM `agences_page_dediee` AS agd2 WHERE agd2.ida = an.idag) AS agpagedediee2, (SELECT COUNT(*) FROM `agence` AS agd LEFT JOIN `forfait` ON agd.`forfait` = `forfait`.`nom` WHERE agd.id = an.idag AND `forfait`.`page_dediee` = 1) AS agpagedediee FROM `annonce` AS an INNER JOIN `agence` AS ag ON an.idag = ag.id INNER JOIN `quartier` AS qu ON an.quartier = qu.idqu WHERE 1 AND an.vendu = 'N' /* AND an.ActivImmo != 'N' */ AND ag.bloque = 'N' AND ag.id != 7 AND ag.forfait != 'LITE' AND date >= '2023-11-13' AND an.transaction IN (0, 1, 2, 3) AND an.ville = 'search.php/images/pictures/577/agencies/logo/css/plugins/prettyphoto/js/netanya' AND (1) AND an.idag IN (210, 144, 233, 226, 316, 342, 601, 511, 525, 232, 288, 175, 60, 357, 440, 379, 513, 522, 527, 529, 577, 630) ORDER BY rand() LIMIT 0,5