Results 1 to 2 of 2
Thread: Dynamic Rollover Menus from DB
Jul 8, 2007, 19:37 #1
- Join Date
- Apr 2004
- 0 Post(s)
- 0 Thread(s)
Dynamic Rollover Menus from DB
I have a site and am trying to setup the rollover menus to drop down the different locations that properties are available in.
Background: When adding a property the site admin selects a city from a drop down menu, the contents of the drop down menu pull from a table called 'geo' where the site admin can add and remove different cities, once the site admin submits the listing, it is store in the table 'properties' and a field within that table contains the submitted city location.
To create the rollover menus I have create a recordset for each the Office, Retail & Residential rollovers - 3 recordsets in total, one for each menu as there are different tables, but that's beyond this question.
These recordsets poll the properties table for the instances of whatever cities have been entered and displays each city has a dropdown selection.
I then use this city variable to populate the link for the drop down selection and link the visitor to whichever is the appropriate page
Here is my question:
How do I write the sql for these 3 recordsets to display only one instance for each city? Presently, There are say 3 listings in the db that contain 'Toronto' for the city and the dropdown menu shows 3 selections for Toronto, I just want one - how?? help!? ..please!
Jul 8, 2007, 23:53 #2
- Join Date
- Aug 2004
- Manchester UK
- 158 Post(s)
- 3 Thread(s)
select DISTINCT city, otherfields from table1 group by cityMike Swiffin - Community Team Advisor
Only a woman can read between the lines of a one word answer.....