On Nov 16, 8:26 am, jebididas <[email protected]> wrote: > I am having a problem with the store locator code building proper XML. > When I call the phpsqlsearch_genxml.php script it does not output any > markers. This is the XML output: > > <?xml version="1.0"?> > <markers/> > > When I make a simple "SELECT address, name, lat, lng from markers" > query the information is showing correctly. > > <?xml version="1.0"?> > <markers><marker name="Pan Africa Market" address="1521 1st Ave" > lat="47.608940" lng="-122.340141" distance=""/></markers> > > This is the section of code not working: > > // Search the rows in the markers table > $query = sprintf("SELECT address, name, lat, lng, ( 3959 * > acos( cos( radians('%s') ) * cos( radians( lat ) ) * > cos( radians( lng ) - radians('%s') ) + sin( radians('%s') ) * > sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < > '%s' ORDER BY distance LIMIT 0 , 20", > mysql_real_escape_string($center_lat), > mysql_real_escape_string($center_lng), > mysql_real_escape_string($center_lat), > mysql_real_escape_string($radius)); > $result = mysql_query($query); > > Any ideas would help. > > Thank you, > > Jody
-- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
