Select from middle rows of database in descending order
Posted: Mon Jun 22, 2009 11:41 pm
I want to select multiple rows from the middle of the database in descending order.
I am aware of using
to pull the last x number of rows, and
to pull z rows starting with row y.
However, I need to be able to "combine" these so I can pull x rows starting with row y and most importantly, I need the data in descending order.
Can anyone recommend the best way to accomplish this?
Thanks for the help!
AT
I am aware of using
Code: Select all
SELECT field FROM table ORDER BY id DESC LIMIT xCode: Select all
SELECT field FROM table LIMIT y,zHowever, I need to be able to "combine" these so I can pull x rows starting with row y and most importantly, I need the data in descending order.
Can anyone recommend the best way to accomplish this?
Thanks for the help!
AT