Welcome Guest, Not a member yet? Register   Sign In
how to use group by?
#1

[eluser]LoganPHP[/eluser]
Code:
$this->load->library('datatables');
  $this->datatables
   ->select("A.account_id,A.name,C.type,C.value,E.email,E.primary ",FALSE)
   ->from('tbl_accounts AS A')
   ->join('tbl_accounts_contact AS C','A.account_id=C.account_id','left')
   ->join('tbl_accounts_email AS E','A.account_id=E.account_id','left')
      ->where('E.primary', '1')
->add_column('action', '<a href="'.site_url(" title="Edit" class="with-tip"><img src="'.base_url().'assets/backend/skin/images/icons/fugue/pencil.png" width="16" height="16"></a>&nbsp;&nbsp;<a href="" id="$1" title="Delete" class="with-tip delete"><img src="'.base_url().'assets/backend/skin/images/icons/fugue/cross-circle.png" width="16" height="16"></a>', 'id');

I want to add group by with this query. Please help me.

Thanks in advance,
Logan




Theme © iAndrew 2016 - Forum software by © MyBB