[eluser]tkaw220[/eluser]
Below is my code:
$this->db->order_by('format, ABS(title)','asc');
$q = $this->db->get('products');
I even tried these combination:
$this->db->order_by('format','asc');
$this->db->order_by('ABS(title)','asc'); // fail
$this->db->order_by('format asc, ABS(title) asc'); // fail also
It sorted my products by format properly but not the titles. Something wrong with my code? I used ABS() to proper sort product with number 1, 2, ... 10, 11. Without it, the products will be sorted by 10, 1, 2, 3 ...
Thanks.