ciao a tutti
ho questo codice:
Codice PHP:
if ordine = "" then strSQL = "SELECT "&_
"* FROM hotel_es as h LEFT JOIN tipo_strutture as t ON "&_
"h.id = t.hotel_id where (h.longitude < "&maxx&" and h.longitude > "&minx&" and h.latitude < "&maxy&" and h.latitude >"&miny&") and (t.hoteltype_id in (" & struttura2 & ") or t.hoteltype_id IS NULL) order by h.latitude desc,h.longitude"
ho 2 variabili
lat_c2= 40,12121
long_c2= 2,12121
vorrei ordinare i record in base a h.latitude o h.longitude in ordine decrescente .. spiego meglio...
ordinami i record dove h.latitude o h.longitude si avvicinano di più a lat_c2 (riferito a h.latitude) o a long_c2 (riferito a h.longitude) ... non so se sono stato chiaro ...