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 'afanuri' HAVING LOWER(state_full) = 'southern kordofan state' ORDER BY populatio' at line 1