1 2 3 4 5 6 7 8 9 10
| $requete = "SELECT id_ads, CONCAT(id_catg,'_',id_subcatg) AS catgforprocess, id_localisation, title, cdesc, prize, submitter, email, website, dateposted ";
$requete .= " FROM ".$prefix."_ads_ads WHERE ";
$requete .= " catgforprocess = '".$_POST['catgforprocess']."'";
$requete .= " AND (id_localisation = '".$_POST['id_localisation1']."' OR id_localisation = '".$_POST['id_localisation2']."' OR id_localisation = '".$_POST['id_localisation3']."')";
if (empty($dateposted1) OR empty($dateposted2))
{ return false;
} else {
$requete .= " AND (dateposted BETWEEN '".$_POST['dateposted1']."' AND '".$_POST['dateposted2']."')";
}
$requete .= " ORDER BY id_ads DESC "; |