Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » PHP




 Page 1 of 1 [ 3 posts ] 



Author Message
 Post subject: How 2 separate recrds nd ORDER BY
 Post Posted: Thu Nov 12, 2009 11:19 am 
Offline

Joined: Sat Feb 21, 2009 2:27 pm
Posts: 59
Let assume i m havin 100 records nd displayed in1 page, then i need to
get da records 4m 50-100 nd use ORDER BY 2 re-order whethr DESC r ASC

How could i do da ORDER BY widout re-order 1st 50 recrds (0-49)...

I have tried a LIMIT 49,50 however it still re-order da first 50 records...

anyone havin ne clue?


Top 
 Post subject: Re: How 2 separate recrds nd ORDER BY
 Post Posted: Thu Nov 12, 2009 11:19 am 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
Hi

Code:

Code:
SELECT *
FROM (SELECT * FROM sometable ORDER BY aCol LIMIT 50,100) a
ORDER BY anotherCol



All the best


Top 
 Post subject: Re: How 2 separate recrds nd ORDER BY
 Post Posted: Thu Nov 12, 2009 11:20 am 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
thanks could u explain da query 2 me please ::)


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 3 posts ] 




Board index » Server Side Development » PHP


Who is online

Users browsing this forum: No registered users and 2 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron