Need to populate select fields in a search form using mysql table fields
I am working on a used car website and need to provide a search form that uses drop down select lists for make and model.
The vehicle data is stored in a single table with separate fields for year, make, model etc.
The search form options are to be limited to the vehicles in the database as those are the only ones available on the sales lot.
The problem I am having is figuring out how to get one option for a make and then populate the model list with just the models of that make.
Is there a way to do a "unique" query on the make and then use that as the basis for a unique query on the models of that make? If so, how do I do that?
Thanks folks!
|