Here is my example URL, for you to check - http://220.225.231.147:8080/gmaps/test.asp Data is provided from http://220.225.231.147:8080/gmaps/testing.asp, using SQL Query
select top 10 * from (SELECT *, ( 3959 * acos( cos( radians(37) ) * cos ( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin ( radians(37) ) * sin( radians( lat ) ) ) ) AS distance FROM maps ) as results where distance < 10000 Example page: http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html Please help me, where I am doing wrong! Thanks, Sri On Jan 25, 1:30 pm, Marcelo <[email protected]> wrote: > On Jan 25, 8:29 am, srikanth <[email protected]> wrote: > > > Can you > > please provide me the url where i can check the result. > > *You* are the one who claims that the result is wrong. > *You* are the one who is asking for help. > *You* are the one that claims that Google's example is wrong, although > thousands of others are using it without problem. > So, who do you think that should provide a link that proves all that? > Yes, you guessed it! It's *you*! > > > And also can you please check my SQL Query and suggest me the correct > > one or any url. > > This is not a group for SQL. > > Please read and follow the group's posting > guidelines:http://groups.google.com/group/Google-Maps-API/web/suggested-posting-...http://groups.google.com/group/Google-Maps-API/web/why-including-a-li... > > -- > Marcelo -http://maps.forum.nu > -- > > > > > Thanks, > > Srikanth > > > On Jan 22, 4:20 pm, Andrew Leach <[email protected]> > > wrote: > > > > On Jan 22, 8:09 am, srikanth <[email protected]> wrote: > > > > > We have used the store example from > > > > -http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html, > > > > when we have executed the MySql query we got the following results - > > > > > Both the distance values from MySql and SQL are not same as given in > > > > the google example, dont know why, google example is also not working. > > > > You appear to have omitted the ORDER BY clause in your translation, > > > which will certainly result in a different result set. > > > > The MySQL results look correct. Giorgio's is 19.87 miles from > > > (37,-122). Consequently the problem must be in your SQLServer > > > implementation -- either the DBMS is miscalculating, or your database > > > is set up wrongly. Not sure how we can help with that. > > > > Andrew > > -- 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.
