View Single Post
Old 01-12-08, 07:32 PM   #3
Registered User
Join Date: Jul 2004
Location: Denton, Texas
Posts: 505
Default Re: MySQL SORT by Column and LIMIT Rows using classic ASP

Originally Posted by CaNiBuS
have you tried:
Set oRS = oConn.Execute("SELECT * FROM `tracking` ORDER BY `model` LIMIT " & startRecord & "," & endRecord)
Sorry, I tried that but didn't think to put it in the question. It gave me the correct number of rows but sorted the whole table not just the rows the limit set. I did find a work around since our usage is small by using some ASP code to semi sort it by storing all the row IDs in an array and then going through the whole table and only outputing the correct rows. That gave me a sorted limited page but it wasn't somthing I'd do for anything large.

It turns out the Boss didn't like the limited page sort so we got rid of it. I worked for over a day on it and then when he saw it running he decided he would rather have the whole table sorted like it did by default Oh well, at least they paid me for it

Thanks for your help.
Antec-SOLO | ASUS-P5Q-SE | C2D-E8600 | AC-Freezer-7-Pro | Seasonic-S12-550W | 3GB-KVR-PC2-6400 | GTX-560Ti | SB-XtremeGamer | Pioneer-BDR-205 | Samsung-S223B | Dell-U2412M
technoid is offline   Reply With Quote