L
lovedaddy
Guest
What I'm trying to do is do a select with a limit first, then order the result.
I'll try and explain with an example
Say I have a table with a single column, with data:
a,b,c,...,x,y,z.
If I did the query: select * from table limit 5,5 I'd get returned:
f,g,h,i,j
If i did a select * from table order by columnname desc limit 5,5 i'd get returned:
q,r,s,t,u.
What I'm trying to do is get the limit first, ie the data set:
f,g,h,i,j. Then sort them to get
j,i,h,g,f.
Is this possible? I've had a brief poke about with the IN function, but cannot seem to crack it.
Pointers would be appreciated.
I'll try and explain with an example
Say I have a table with a single column, with data:
a,b,c,...,x,y,z.
If I did the query: select * from table limit 5,5 I'd get returned:
f,g,h,i,j
If i did a select * from table order by columnname desc limit 5,5 i'd get returned:
q,r,s,t,u.
What I'm trying to do is get the limit first, ie the data set:
f,g,h,i,j. Then sort them to get
j,i,h,g,f.
Is this possible? I've had a brief poke about with the IN function, but cannot seem to crack it.
Pointers would be appreciated.