Ciao ho bisogno di fare una select complessa
questo è il codice:
Codice PHP:
sql_hotelcitta = "select top 10 * from hotel_es where city_hotel like '"&replace(nomecitta,"'","''")&"%' order by minrate asc,id"
sql_hotelcitta = "select top 10 * from hotel_es where city_hotel like '"&replace(nomecitta,"'","''")&"%' order by minrate desc,id"
sql_hotelcitta = "select top 10 * from hotel_es where class=1 and city_hotel like '"&replace(nomecitta,"'","''")&"%' order by minrate asc,id"
sql_hotelcitta = "select top 10 * from hotel_es where class=2 and city_hotel like '"&replace(nomecitta,"'","''")&"%' order by minrate asc,id"
sql_hotelcitta = "select top 10 * from hotel_es where class=3 and city_hotel like '"&replace(nomecitta,"'","''")&"%' order by minrate asc,id"
sql_hotelcitta = "select top 10 * from hotel_es where class=4 and city_hotel like '"&replace(nomecitta,"'","''")&"%' order by minrate asc,id"
sql_hotelcitta = "select top 10 * from hotel_es where class=5 and city_hotel like '"&replace(nomecitta,"'","''")&"%' order by minrate asc,id"
Se faccio le varie select separate una ad una funziona tutto il problema sta nel fatto che (ovviamente) alcuni record vengono ripetuti come potrei fare in modo da non ripete i record?