MySQL 1064 error, works in command line and phpMyAdmin; not in app -


This is my query:

 Select from  to (* select * 3956 * 2 * ASIN (SQRT (power (SIN (RADIANS (45.52,00,077 - lat) / 2), 2) Storage controller (RADIANS (45.52,00,077) * Storage controller (RADIANS (lat) ) * Electricity (SIN (RADIANS (-122.6 9, 42014 - LNG) / 2), 2))) distance as distance from distance, route SCCH) as the P group by the route, distance by the limit of ACC Order Order 10  

It works fine on the command line and PHPMyAdmin. I have been using my Javascript to connect to MySQL via backend, and the request is returning a 1064. error.

Here is the encoding DBSlayer string request:?

{% 22SQL% 22:% 22select% 20 *% 20from% 20% 28select% 20 *,% 203,956% 20 *% 202% 20 *% 20ASIN% 28SQRT% 28POWER% 28SIN% 28RADIANS% 2845.5200077% 20% 20lat% 29 /% 202% 29,% 202% 29% 20 +% 20COS% 28RADIANS% 2,845.52,00,077% 29% 29% 20 *% 20COS% 28RADIANS% 28lat% 29% 29% 20 *% 20POWER% 28SIN% 28RADIANS% 28-122.6942014% 20% 20lng% 29/2% 29,2% 29% 29% 20% 20distance% 20from% 20% 60stops% to 60% 20order% 20by% 20% 60distance 60%,% 20% 60route% to 60% 20asc% 29% 20as% 20p% 20group% 20by% 20% 60route 60%,% 20% 60dir% to 60% 20order% 20by% 20% 60distance% to 60% 20asc% 20limit% 2010% 22}

and response:

{"MYSQL_ERRNO": 1064, "mysql_error": "You There is an error in your SQL syntax, the manual that is correct to speak Check line 1, "on SER - pass' LAD (RADIANS (45.52,00,077)) * RADIANS (lat) * Electricity (SIN (RADIANS) (-122.6 9, 42 ,014 "VER": "TriMet"!}

thanks

After

The possible instantaneous source URL encoding of your problem - I think the plus operator is transmitted - is it? This is dangerous, because + is used for space in traditional encoding.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -