Help - Search - Members - Calendar
Full Version: Count # of States
User Forums > Ultimate Locator v1 - v2.5 Support > General Support
Bryant
I would like to display the # of states represented by locations stored in our locator and place that on the initial page of the locator.

I can do it from the backend within PHPAdmin but not sure how I should do that so that it dynamically displays when a new location is added that is also a new state to our locations.

Ideas anyone?

Thanks,

Bryant

Our locator is here

American Heritage Girls Locator
Brian
Could you be a little more descriptive? I'm not quite sure I undersand exactly what you are looking for. Thanks!
Bryant
OK, Say I have 35 locations represented by 13 States. I want a statement that looks like this.

=====To be on our initial Search page==================

"We have Troops in 13 States. Select a state below using our Map or use our search by City or Zip code to locate one near you!"

============================================


I want the 13 to be populated by a "Distinct" function of the State Field

Hope this makes better sense.

Thanks,

Bryant
Brian
In order to do this, you would have to add some custom php code inside the index.php file. It would need to calculate the number of locations you have then review how many different states there are and don't duplicate any.

Then a total number could be extracted.

You would then need to put a {placeholder} on the index.htm template and replace that placeholder with your results.

Unfortunately, I do not have any code for this.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.