我如何在此代码中使用order by(name)来获得asc命令的结果?
这是一段代码:
function getRecordByID($id)
{
$this->db->select($this->tbl_area_menu.'.*,'.$this->tbl_users.'.firstname as created_by,'.$this->tbl_page.'.name as page_name,'.$this->tbl_page.'.slug as page_slug,'.$this->tbl_page.'.template_directory,'.$this->tbl_directory.'.slug as directory_slug');
$this->db->where($this->tbl_area_menu.'.id',$id);
$this->db->join($this->tbl_users,$this->tbl_users.'.id = '.$this->tbl_area_menu.'.created_by','left');
$this->db->join($this->tbl_page,$this->tbl_page.'.id = '.$this->tbl_area_menu.'.page_id','left');
$this->db->join($this->tbl_directory,$this->tbl_directory.'.id = '.$this->tbl_page.'.template_directory','left');
$query = $this->db->get($this->tbl_area_menu);
//echo $this->db->last_query();
$record = $query->row();
return $record;
}