mantenendo lo sprintf() dovresti fare una cosa del genere:
Codice PHP:
// begin Recordset
if (isset($_GET["zon"]) AND $_GET["zon"] != '' ) {
$KTColParam1__rs_search_f_zon = $_GET["zon"];
$valore1 = GetSQLValueString($KTColParam1__rs_search_f_zon, "int";
$format1 = '%d';
} else {
$KTColParam1__rs_search_f_zon = '%';
$valore1 = GetSQLValueString($KTColParam1__rs_search_f_zon, "text";
$format1 = '%s';
}
// ripeti per gli altri due valori e poi il where:
........
WHERE
ristoranti_ris.idzon_ris LIKE '$format1'
AND ristoranti_ris.idamb_ris LIKE '$format2'
AND ristoranti_ris.idtip_ris LIKE '$format3'
AND menu_men.num_men!=0;
GROUP BY ......
ORDER BY ...... ", $valore1, $valore2, $valore3);