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 '' at line 6
.select r.id, r.name, rc.region_name, rc.major_city, c.country_code, c.country_name FROM resorts r INNER JOIN regions_cities rc ON r.region_city_code=rc.id INNER JOIN countries c ON r.country_code=c.country_code WHERE r.id =