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 'INNER JOIN location ON location.id_location=bar_location.id_location WHERE bar.i' at line 1