Jump to content

[SOLVED] How to separate records and ORDER BY


robert_gsfame

Recommended Posts

Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and use ORDER BY to re-order whether DESC or ASC

 

How can i do the ORDER BY without re-order first 50 records (0-49)...

 

I've tried LIMIT 49,50 but it still re-order the first 50 records...

 

anyone has a clue?

Hi

 

It is just doing one query to get the records you are  interested in, and then doing a select from that query to get them into the order you want them in.

 

The a floating around is just an alias name for the sub query as MySQL insists on subqueries being named.

 

All the best

 

Keith

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.