1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
if ($text_search <> "") {
$search .= " AND (a.ad_headline LIKE '%$text_search%' OR a.ad_text LIKE '%$text_search%') AND a.published = 1";
}
else
//MODIFICATION Pascal
if (isset($_GET['Prixmini']) && isset($_GET['Prixmaxi'])) {
$search .= " AND a.ad_price > " . $_GET['Prixmini'] . " AND a.ad_price < " . $_GET['Prixmaxi'] ." AND a.published = 1";
}
else
{
$search .= " AND a.published = 1";
}
//FIN MODIFICATION Pascal
$url .= $url_param;
echo "<p>texte : " . $_GET['text_search'] . "</p>"
. "<p>Prixmini : " . $_GET['Prixmini'] . "</p>"
. "<p>Primaxi : " . $_GET['Primaxi'] . "</p>";
exit;
$query = "SELECT DISTINCT a.id FROM #__adsmanager_ads as a ".
"LEFT JOIN #__adsmanager_adcat as adcat ON a.id = adcat.adid WHERE $search ";
$database->setQuery($query);
$total = count($database->loadObjectList()); |