[eluser]Bnoe[/eluser]
Code:
$this->db->like('users.username', $key);
$this->db->or_like('user_profile.keterangan', $key);
$this->db->join('user_profile','tbl_users.user_id=tbl_user_profile.user_id','left');
$query = $this->db->get('users');
got this query
SELECT * FROM (`tbl_users`) LEFT JOIN `tbl_user_profile` ON tbl_users.user_id=tbl_user_profile.user_id WHERE
tbl_tbl_users.username LIKE '%a%' OR
tbl_tbl_user_profile.description LIKE '%a%' LIMIT 20