Select All by php/sql from database

20 views
Skip to first unread message

mwcog mwcog

unread,
Jun 15, 2011, 11:36:39 AM6/15/11
to google-map...@googlegroups.com
So I'm using the php/sql method  (http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html) to display my data.  I've modified the xml and it correctly shows my data.  I'd like to sort on one of my columns, but I cannot get it to show all.

$query = sprintf("SELECT Juris, Cost, lat, lng, ( 3959 * acos( cos( radians('%s') ) * cos( radians( lat ) ) * cos( radians( lng ) - radians('%s') ) + sin( radians('%s') ) * sin( radians( lat ) ) ) ) AS distance FROM ARP_projects WHERE Juris = $Juris",

Now if I use the following address it works fine.....anacostia_xml_domnew.php?lat=39&lng=-77&radius=10000&Juris=PG
what should i replace PG with to show all records?  the standard * doesn't seem to work.

Rossko

unread,
Jun 20, 2011, 4:06:57 AM6/20/11
to Google Maps JavaScript API v3
> Now if I use the following address it works
> fine.....anacostia_xml_domnew.php?lat=39&lng=-77&radius=10000&Juris=PG
> what should i replace PG with to show all records?

It's not a maps question, I would suggest a php/MySQL tutorial.
You could for example write some php to test for the value of Juris
and then construct a MySQL query to suit you.

> the standard * doesn't
> seem to work.

Standard? That's not a MySQL standard.
example
http://www.ozzu.com/programming-forum/wildcards-with-mysql-t37189.html
Reply all
Reply to author
Forward
0 new messages