Jump to content

[SOLVED] order by two rows?


XpertWorlock

Recommended Posts

Is it possible two sorts by two rows in a database

 

I.e. Sort by one row (integer) and than another row (integer).

 

 

0/0, 0/1, 0/2, 0/3, 0/4, 1/0, 1/1, 1/2, 2/0, 2/1,

 

etc.

 

I've tried various methods and am trying to do it with as little code as possible

 

Thanks alot

Mike

 

Link to comment
https://forums.phpfreaks.com/topic/114413-solved-order-by-two-rows/
Share on other sites

I think you might be asking about sorting by two columns? If so, you need an ORDER BY term in the query that lists the columns -

 

ORDER BY column1, column2

 

This will sort using column1 values, then within each value in column1, it will sort using the column2 values.

 

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.