jthor, FireFox Error Console
Error: syntax error Source File: http://www.gaspares.com.au/map1.html Line: 1, Column: 1 Source Code: 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 'long * (PI()/180)) Long is a reserved word http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html try lng in your statement instead error 'long * (PI()/180)) + cos(center_lat * (PI()/180)) * sin(center' try 'lng * (PI()/180)) + cos(center_lat * (PI()/180)) * sin(center' original tutorial code SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin ( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < 25 ORDER BY distance LIMIT 0 , 20; Mapperz http://mapperz.blogspot.com/ On Feb 9, 7:08 am, marcelo <[email protected]> wrote: > On Feb 9, 8:01 am, jthor <[email protected]> wrote: > > > > > I am not sure how to test the script to see if it is sending an xml > > result. > > Point your browser to the PHP script directly with a valid lat/lon, > > Melbourne:http://www.gaspares.com.au/dealer_results1.php?lat=-37.788081&lng=144... > > -- > Marcelo -http://maps.forum.nu > -- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
