[eluser]tj[/eluser]
tnx 4 ur reply my need is to change the field name in normal query we can write it as
DATE_FORMAT(tasks.start_date,’%b %D %y’ ) as task_stdate, and change the field name
how is it done in active records i have 2 field with same name from different tables
my query is
$this->db->select(' tasks.id,
tasks.project_id,
tasks.business_id,
tasks.title,
tasks.description,
tasks.task_priority,
tasks.start_date,
tasks.end_business_user_id,
business_client.name,
satff.staff_name,
mytasks.start_date,
mytasks.task_status,
mytasks.end_date');
$this->db->from('tasks');
$this->db->join('business_client', 'business_client.id = tasks.started_business_client_id');
$this->db->join('mytasks', 'mytasks.task_id = tasks.id', 'left');
$this->db->join('satff', 'satff.id = mytasks.staff_id', 'left');
$this->db->limit($num, $offset);
$q = $this->db->get();
return $q->result_array();