Code: Select all
public function get_task_threads_first_last($task_id)
{
$this->db->select("t.nt_id, t.nt_responsed_by, t.nt_detail 'task_detail', t.nt_response_date, u.ui_full_name 'user_name', u.ui_designation 'user_designation', u.ui_phone 'extension', nt_response_date 'response_date'");
$this->db->from('tm_task_detail t');
$this->db->order_by("nt_response_date");
$this->db->join('ac_user_info u', 'u.ui_id = t.nt_responsed_by');
$this->db->where('t.nt_task_id', $task_id);
$query = $this->db->get();
return $result = $query->result();
}
Außerdem denke ich, dass es sinnlos ist, alle Zeilen auszuwählen, als die erste und letzte Zeile daraus herauszuholen.
Mobile version