codeigniter order by query builder code example
Example 1: codeigniter query builder order by
$this->db->order_by('title', 'DESC');
// Produces: ORDER BY `title` DESC
Example 2: order by in codeigniter query builder
$this->db->order_by('RegisteredUserID','ASC')
// Produces: ORDER BY `RegisteredUserID` ASC
$this->db->order_by('RegisteredUserID','DESC')
// Produces: ORDER BY `RegisteredUserID` DESC