I'm generating a pulldown menu using PHP and MySQL. Originally I had the
list order by model where it put everything in alphabetical order. I need to
order them by year of model which luckily coincides with the order that I
dumped them into the database so I would like to ORDER by id which was an
auto-increment number. The list work fine when ordering by model but when I
order by id I pull up more then distinct model names. Here's the query;
$menu_query = "SELECT DISTINCT model"
. " FROM a_clutch"
. " WHERE make = \"Harley-Davidson\" AND status = \"active\""
. " ORDER BY id";
How can I pull up distinct models and order just the distinct models by id?
Thanks,
Tom
>>.>>.>>>.>>>>>.>>>>>>>>>.>>>>>>>>
Tom Beidler
Orbit Tech Services
805.682.8972 (phone)
805.682.5833 (fax)
[EMAIL PROTECTED]
http://www.orbittechservices.com/
>>.>>.>>>.>>>>>.>>>>>>>>>.>>>>>>>>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php