I have some problems when using mysql. My environment is wamp, the problem occurred when I was trying to extract some data from an xml file. Here is the error.
Invalid query: 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 ‘) ) * cos( radians( lat ) ) * cos( radians( lng ) – radians() ) + sin( radians()’ at line 1
I was trying to play with the google map store locator, here is the link to the course. I gotta say I ran the program well the other day, but today it broke. Weird.
Btw, there is also error when importing .csv file to my mysql, which will cause values to the wrong keys. Is it related?
Anyone can help me out? Thx!
The SQL query you entered is invalid. You probably forgot to fill in a parameter, which makes the parser flip.
The page you gave us shows this query:
What query are you using? Did you replace the
37by something? If you just leave out the 37, the query will fail with the error you described:because MySQL is calling the radians function and expecting an argument.