I'm using Kohana's ORM library, and I'm wondering if there is any way to order the results that are generated.
Example:
$priorities = ORM::factory('priority')->select_list('id','label'); //how to order these?
I'm using Kohana's ORM library, and I'm wondering if there is any way to order the results that are generated.
Example:
$priorities = ORM::factory('priority')->select_list('id','label'); //how to order these?
What is select_list
?
Btw, ordering in kohana is performed by order_by()
method
...->order_by('field', 'asc')
More samples you can find at: http://kerkness.ca/wiki/doku.php?id=building_complex_select_statements#order_by
Also that wiki contains a lot of usefull articles about kohana: http://kerkness.ca/wiki/doku.php