Answers for "codeigniter order by query"

PHP
1

codeigniter order by

$this->db->from($this->table_name);
$this->db->order_by("name", "asc");
$query = $this->db->get(); 
return $query->result();
Posted by: Guest on June-04-2020
0

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
Posted by: Guest on April-04-2021

Browse Popular Code Answers by Language