I have a dealer database with 3000+ records and I'm building a manager to
sift through the items.

Currently I ORDER and LIMIT by name so I can come up with names that begin
with "A" and LIMIT the returns to 25, and then click to see the next 25
names beginning with "A" etc.

Now here's where I'm running into problems. I would like to ORDER the 25
names beginning with "A" by a second parameter. For example, the first 25
names beginning with "A" are from 12 different states. I'm trying to create
a query that would find the first 25 names beginning with "A" and ORDER by
state. 

Currently my query has only one ORDER so when I try to ORDER by state I get
the first 25 records listed by state.

Here's the query;

SELECT id, name, state, country, status FROM dealer WHERE name LIKE "A%"
ORDER BY name LIMIT 0, 25;

I've also tried;

SELECT id, name, state, country, status FROM dealer WHERE name LIKE "A%"
ORDER BY name, state LIMIT 0, 25

But that didn't work.

Any help would be appreciated.

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

Reply via email to