Advertisement
jamboljack

Jumlah Laporan Pelaksanaan

Jan 26th, 2019
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. // Total Laporan Pelaksanaan
  2.     public function jumlahpelaksanaan_post()
  3.     {
  4.         $username = trim($this->post('username'));
  5.  
  6.         if ($username == '') {
  7.             $response = [
  8.                 'resp_error' => true,
  9.                 'resp_msg'   => 'Username kosong.',
  10.             ];
  11.         } else {
  12.             $this->db->select('count(propose_id) as jumlah');
  13.             $this->db->from('lemlit_propose');
  14.             $this->db->where('propose_status', 3);
  15.             $total = $this->db->get()->row();
  16.  
  17.             $response = [
  18.                 'resp_error' => false,
  19.                 'resp_msg'   => 'success',
  20.                 'total'      => number_format($total->jumlah, 0, '', ','),
  21.             ];
  22.         }
  23.  
  24.         $this->response($response, 200);
  25.     }i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement