I would like to add a slider-bar to my site on which to filter markers retrieved from my database, by date (YEAR).
The following SQL query returns the distinct YEARS for which i have records - each of which i would like to be a notch on my slider:
$query_years = mysql_query("Select distinct YEAR(date) from locations order by date");
I asked the following question "How do i add increments to my slider" - which mplungian answered:
Now i need to know...
1. How do i add the distinct years from the SQL query as increments to my slider - please can you show me how this is done?
2. How do i set each increment to only return records from the corresponding year - e.g.
"SELECT * FROM locations WHERE YEAR(date) = date"
I suspect that i will need to disable my current database queries while the slider is in use. Ideally the first (default) notch on the slider would display all records/markers.
Any help and advice greatly appreciated