Magic methods and order by
Is it possible to and an order by to a magic method?
If I have an organisations model and ues a magic method of
$this->organisations_model->find_all_by_relationship_id('1');
It would return
Array
(
[0] => Array
(
[id] => 1
[organisation_name] => Beta Company
[relationship_id] => 1
)
[1] => Array
(
[id] => 2
[organisation_name] => Alpha Company
[relationship_id] => 1
)
)
Is it possible to then order this on organisation name?
Thanks
Comments
$this->organisations_model->db()->order_by('organisation_name', 'asc'); $this->organisations_model->find_all_by_relationship_id('1');