Error performing query SELECT schools.altID as id,schools.school,cities.id as cityID, cities.city FROM cities, states,schools WHERE cities.city = 'O'neill' AND states.state = 'Nebraska' AND cities.stateID = states.id AND schools.lcity = cities.id ORDER BY schools.school - 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 'neill' AND states.state = 'Nebraska' AND cities.stateID = states.id ' at line 3