Query Fallita: [SELECT regioni.id, regioni.eng AS regione, COUNT(hotel.idhotel) AS total FROM hotel JOIN regioni ON (hotel.regione = regioni.id) LEFT JOIN hotel_info ON hotel_info.idhotel = hotel.idhotel WHERE (hotel.sospeso = 1) AND (regioni.portale = 24) AND (hotel.portale = 24) AND (hotel.stato_scheda = 0) AND (hotel_info.CHK >= 218) AND (hotel_info.CNT_ST1 > 0) GROUP BY regioni.eng HAVING total >= ORDER BY RAND() LIMIT 0,2] --->You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY RAND() LIMIT 0,2' at line 1