|
|
#1 | ||
|
Registered User
Join Date: Jul 2004
Location: Denton, Texas
Posts: 505
|
I started to add paging code to my project at work and I can't seem to get sorting and paging to work at the same time. I'll put the querries below for them separately but how do I start at a row offset and sort too.
Example: 50 Rows in table I want to start at row 0, 10, 20, 30, 40 and display 10 rows but also sort them by any column. Here's the two querries I used before I tried to add paging and just tried to add display row offsets. That works but I can't seem to get the right combination to get paging and sorting together. I'm using classic ASP to write the code. Quote:
Quote:
__________________
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 |
||
|
|
|
|
|
#2 | |
|
Registered User
|
have you tried:
Set oRS = oConn.Execute("SELECT * FROM `tracking` ORDER BY `model` LIMIT " & startRecord & "," & endRecord)
__________________
![]() ![]() Comp Specs: Intel Q9650 @ 3.95Ghz Asus Rampage Extreme 2x2GB Mushkin DDR3-1600 @ 6-6-6-17 eVGA GTX 280 SSC BFG ES-800 PSU |
|
|
|
|
|
|
#3 | |
|
Registered User
Join Date: Jul 2004
Location: Denton, Texas
Posts: 505
|
Quote:
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 itThanks 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 |
|
|
|
|
|
|
#4 | |
|
Dethklok Returns!
|
Personally I always found it annoying when "search results" were limited without any orthodox means of increasing the limit.
Like, searching for an item on siteX returns 900 results with each page only showing 5 items! wtf! lol... I always try to include an options for sorting, number of results per page, etc. |
|
|
|
|
|
|
#5 | |
|
Registered User
Join Date: Jul 2004
Location: Denton, Texas
Posts: 505
|
Quote:
__________________
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 |
|
|
|
|
![]() |
| Thread Tools | |
|
|