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 rc.id, rc.region_name, p.province_code, p.province_name, c.country_code, c.country_name FROM regions_cities rc INNER JOIN provinces p ON rc.province_code=p.province_code INNER JOIN countries c ON p.country_code=c.country_code WHERE rc.id =