Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Using mysql table / field data to populate a search form
Old 11-12-2008, 12:40 AM Using mysql table / field data to populate a search form
Experienced Talker

Posts: 38
Name: Alan
Trades: 0
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!
__________________

Please login or register to view this content. Registration is FREE
alhefner is offline
Reply With Quote
View Public Profile Visit alhefner's homepage!
 
 
Register now for full access!
Old 11-12-2008, 02:03 AM Re: Using mysql table / field data to populate a search form
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
select distinct make from table where onsale = 1

select * from table where make = '{$_GET['make']}' and onsale = 1
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to Using mysql table / field data to populate a search form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.52678 seconds with 12 queries