A Database Error Occurred

Error Number: 1064

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 '.213234 -REPLACE(p_map_long,' ','')))))*60 * 1.1515 * 1.609344) as n FROM gp_' at line 1

SELECT p_id,p_name,p_detail_h,p_pic,p_view,(DEGREES(ACOS(SIN(RADIANS(20.205025380615414)) * SIN(RADIANS(REPLACE(p_map_lat,' ',''))) + cos(RADIANS(20.205025380615414)) * cos(RADIANS(REPLACE(p_map_lat,' ',''))) * cos(RADIANS(99.7537597409030220.213234 -REPLACE(p_map_long,' ','')))))*60 * 1.1515 * 1.609344) as n FROM gp_page WHERE lang_id = '1' AND flag = 'Y' AND (DEGREES(ACOS(SIN(RADIANS(20.205025380615414)) * SIN(RADIANS(REPLACE(p_map_lat,' ',''))) + cos(RADIANS(20.205025380615414)) * cos(RADIANS(REPLACE(p_map_lat,' ',''))) * cos(RADIANS(99.7537597409030220.213234 -REPLACE(p_map_long,' ','')))))*60 * 1.1515 * 1.609344) <= '15' and (DEGREES(ACOS(SIN(RADIANS(20.205025380615414)) * SIN(RADIANS(REPLACE(p_map_lat,' ',''))) + cos(RADIANS(20.205025380615414)) * cos(RADIANS(REPLACE(p_map_lat,' ',''))) * cos(RADIANS(99.7537597409030220.213234 -REPLACE(p_map_long,' ','')))))*60 * 1.1515 * 1.609344) >= '0.01' ORDER BY n asc limit 40

Filename: /home/gplace/public_html/models/page_model.php

Line Number: 125