Perfetto funziona grazie mille !!
![]()
Perfetto funziona grazie mille !!
![]()
*** You shouldn't compare yourself to the best others can do but to the best you can do ***
Sorry sempre io...
tutto funziona bene...
Mi e' stato chiesto di inserire una clausola 'range prezzo' e quindi dovrei arrivare a fare una cosa del genere:
zona = '$zona' AND camera = '$camera' AND prezzo BETWEEN '$prezzo_min' AND '$prezzo_max'
Mi sono incartato con l'array, ne ho definito un altro ma non riesco a concatenare il tutto..
*** You shouldn't compare yourself to the best others can do but to the best you can do ***
Codice PHP:$arrClausole = array();
$arrClausole2 = array();
if (!empty($zona)) {
$arrClausole[] = " zona = '$zona' ";
}
if (!empty($prezzo_min)) {
$arrClausole2[] = " prezzo_min = '$prezzo_min' ";
}
if (!empty($prezzo_max)) {
$arrClausole2[] = " prezzo_max = '$prezzo_max' ";
}
$clausola = implode(' AND ', $arrClausole, "prezzo BETWEEN".$arrClausole2);
*** You shouldn't compare yourself to the best others can do but to the best you can do ***
Codice PHP:if (!empty($prezzo_min) && !empty($prezzo_max)) {
$arrClausole[] = " prezzo BETWEEN '$prezzo_min' AND '$prezzo_max' ";
}
Ridatemi i miei 1000 posts persi !!!!
Non serve a nulla ottimizzare qualcosa che non funziona.
Cerco il manuale dell'Olivetti LOGOS 80B - www.emmella.fr
*** You shouldn't compare yourself to the best others can do but to the best you can do ***