Firstly, "long" is a reserved keyword in MySQL. You will need to wrap it in reverse measures:
SELECT `long`,lat FROM schools
A complete list of reserved keywords can be found here: Reserved words
If you have access to a tool, such as phpMyAdmin, I recommend running query testing there.
Otherwise, try this in your code after running mysql_query ():
print(mysql_errno().' '.mysql_error());
This should give you the error code and the error message generated by MySQL. The query looks fine, except for the problem with the keyword, but it will definitely tell you.
source share