ok, i think i understand what your saying...im gonna give that a shot, but unfortunately i have to redo my whole db and find all the latitudes and longitutdes again, may take a few days... i will get back to you and i really appreciate your assistance, once i get this db reset up i will probly need another push in the right direction, thanks to you and everyone else that responded to my posts it is very greatly appreciated. If google needs a spokesperson, i will wear a google hat shoes short, anything you want, i f***ing love google, google makes the world literally easier to livein. Thanks
On Jul 23, 3:47 pm, Andrew Leach <[email protected]> wrote: > On Jul 23, 8:27 pm, opusrandy <[email protected]> wrote: > > > What we WANT it to do...is we want to set > > up a static page with a list of branches for a particular state, and > > then somehow pass the url when the branch name is clicked, so that the > > locator I currenltly have grabs only the branch_id you had clicked on. > > OK... you currently have > $center_lat = $_GET["lat"]; > $center_lng = $_GET["lng"]; > $radius = $_GET["radius"]; > which take those parameters from the url. Add another one for "name" > since you already have that in your database -- or create an id column > in your database and add such a line for "branch_id". > > Then get your code to decide what to do based on whether it gets a > branch_id or not: > if ($branch_id) { > $query = sprintf("SELECT address, name, lat, lng, > 0 as distance FROM markers WHERE branch_id='%s'", > mysql_real_escape_string($branch_id)); } > else { > // do your existing query > } > > Then carry on as before. Note that I've specified retrieving a column > called "distance" with a fixed value of zero, just so that any > subsequent code will find something there. > > The while loop which iterates through the result set should only ever > find one row retrieved with a particular branch_id, but even if there > are more for some reason, the code won't fail: it will simply show > them all. > > As you say, you will need some identifier for each store in your > database. It could be the existing name, or a store number, or maybe > even the zipcode if you have only one or two per zipcode. Up to you. > > 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 -~----------~----~----~----~------~----~------~--~---
