Do you mean get all rows, regardless of what the value of Juris is?

... then just remove the WHERE clause from the SQL statement.

Or do you mean get a list of values, to be able to draw the dropdown?

... the use of GROUP BY or DISTINCT in mysql should be investigated.



(also note that the use of sprintf, the values after the initial
string (containgn the sql statement) define what gets put in place of
the placeholders (%s) - it doesnt look like the placeholders and
values line up in your example.
http://php.net/sprintf )


On Wed, Jun 15, 2011 at 4:45 PM, mwcog mwcog <[email protected]> wrote:
>  So i'm new to all this and have, what should be, and ease question.
>
> I've successfuly modified the store locator example
> (http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html) to fit my
> data.  I've also added a dropdown menu to run a select statement on the .xml
> page. It works when I pass the following address
> (......_xml_domnew.php?lat=39&lng=-77&radius=10000&Juris=PG, note the PG
> value) to the xml.  However, what do i do to select all Juris (I have many
> Juris values).  Here is the select statement I use:
>
>
> // Search the rows in the markers table
> $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"",
>  mysql_real_escape_string($Juris),
> mysql_real_escape_string($center_lng),
> mysql_real_escape_string($center_lat),
> mysql_real_escape_string($radius));
>
> What do I need to do to select all records in the Juris Column?
>
> Any help?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-maps-js-api-v3/-/I_fQJmEgFQMJ.
> 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-js-api-v3?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to