Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paging using LIMIT to get last x amount of records

Status
Not open for further replies.

Floodster

Technical User
Jan 28, 2005
204
Hi,
I'm using ASP & MySQL Server 5.0. I have currently got my paging to work by using the LIMIT command in my SQL. I can use this for my buttons FIRST, NEXT & PREVIOUS but I'm stuck at how to retrieve the last x amount of records as I don't know how many records there are in total unless I run a seperate SQL which I would prefer not to.

I've read other forums & they suggest using ORDER by xx DESC but I'm a bit unsure.

thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top