order by in codeigniter query builder

Solutions on MaxInterview for order by in codeigniter query builder by the best coders in the world

showing results for - "order by in codeigniter query builder"
Isabella
28 Feb 2017
1$this->db->order_by('title', 'DESC');
2// Produces: ORDER BY `title` DESC
3
Rebeca
13 May 2018
1$this->db->order_by('RegisteredUserID','ASC')
2// Produces: ORDER BY `RegisteredUserID` ASC
3
4$this->db->order_by('RegisteredUserID','DESC')
5// Produces: ORDER BY `RegisteredUserID` DESC