Use a WHERE clause... If your table looks like this....
PARTS TABLE
MAKE MODEL YEAR PART PART_DESCRIPTION
Ford Escort 1995 Breaks two breaks 29.99
Ford Ranger 2000 Breaks bla
Ford Probe 1985 Breaks bla
First you want make your SQL looks like this...
(user selects Ford)
$query = "SELECT model FROM parts ";
$query .= "WHERE MAKE = "Ford";
Populate a drop down with the results... for this example should be
Escort
Ranger
Probe
Then he selects Escort...
$query = "SELECT year FROM parts ";
$query .= "WHERE MAKE = 'Ford' ";
$query .= "AND MODEL = 'Escort' ";
The "WHERE MAKE" is not absolutely needed but will definitely cut out any chance of selecting the wrong data.
Now give the user a list of years that you have in your database for that make and model and have them choose a part or whatever... if they chose breaks the query would look like this...
$query = "SELECT part_description FROM parts ";
$query .= "WHERE MAKE = 'Ford' ";
$query .= "AND MODEL = 'Escort' ";
$query .= "AND YEAR = '1995' ";
$query .= "AND PART = 'breaks' ";
and the query returns "two breaks 29.99" you get the idea
Deo