$this -> db -> select('users.*');
$this -> db -> select('timerecord.*');
$this -> db -> from('users');
$this -> db -> join('timerecord', 'users.id = timerecord.id');
//$this -> db -> where(array('users.id'=>$user_id), NULL, FALSE);
$this -> db -> where('users.status', 'Verified');
//$this -> db -> where('users.id', 'timerecord.id');
$this -> db -> order_by('timerecord.timeId', 'DESC');
$this -> db -> group_by('timerecord.id, users.id');
i want to get records from both users and timerecord table but timerecord shows multiple rows because of duplicated id, and now i used group_by to limit the row in timerecord however the record is not showing the latest record i also used orderby but no luck, please someone help me, thanks!