Error, query {SELECT hotel_id, hotel_name FROM hotels WHERE location_id = AND (visibility = 'all' OR (visibility = 'staff-and-same-affiliate' AND affiliate_id = '')) ORDER BY rooms_from} failed. 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 'AND (visibility = 'all' OR (visibility = 'staff-and-same-affiliate' AND affiliat' at line 1