I have the following query which is returning an error. Can somebody please tell me what is wrong with my query? I looked at it again and again but everything seems fine to me.
Query
SELECT cities.latitude as lat, cities.longitude as long, cities.name as ctn, states.name as stn, countries.name as cn FROM cities
LEFT JOIN states ON cities.state_id = states.id
LEFT JOIN countries ON states.country_id = countries.id
WHERE cities.id = :id
Error
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'long, ct3.name as ctn FROM cities LEFT JOIN state...' at line 1 in