Jump to content

JimHark5

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JimHark5's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I\'m wondering if there is a simple way to retrieve the last 10 records from an autonumbered id field in a table, but sort these last 10 records by name, or alphabetically ascending. So if my last records are 500-510, I\'d like just the 10 records in that range ordered alphabetically. Say I have a simple sql query (I\'m using a mysql database so no TOP 10 queries, just LIMIT) like: Select id, name FROM articles Is there someway that I can use the LIMIT or some other function to do what I want? I\'ve tried using the LIMIT function in various ways, but if I try to ORDER BY name ASC with it like with LIMIT 10, it will give 10 records, but not records 500-510 sorted alphabetically. I know I could do it either using an additional variable through another recordset or by filtering this query through another recordset, but my page already has enough recordsets, and I\'d like to avoid another if possible.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.