Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //contoh pertama
- public function jumlahUser(){
- return $this->db
- ->select('count(distinct(idUser)) as user')
- ->group_by('idUser')
- ->get('tableNya')->row()->user;
- }
- //contoh kedua
- public function jumlahUser(){
- return $this->db
- ->select('count(idUser) as user')
- ->group_by('idUser')
- ->get('tableNya')->row()->user;
- }
- //view nya saya gunakan ini:
- $totalUser=$this->modelnya->jumlahUSer();
- echo $totalUser;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement