i have a table as shown below
std | division | roll_no
2 b 1
4 b 3
2 a 6
I want to achieve the result of this simple query
SELECT * FROM students ORDER BY std ASC , division ASC , roll_no ASC
so my desired result would be
std | division | roll_no
2 a 6
2 b 1
4 b 3
I couldn't find a direct way to use mutiple ORDER BY clauses so I tried the below hack
$crud->order_by('std ASC,division ASC,roll_no','ASC');
but it simply sorts them according to "roll_no" but not "std" and "division"
any tips would be helpful.
ORDER_BY result is not as expected
Started by Adesh Rohan D'silva, 01 August 2012 - 05:38 AM
- Single Page
Posted 01 August 2012 - 05:38 AM