Advertisement
jamboljack

Daftar Klinik E-Health

Aug 29th, 2019
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. public function listklinik_post()
  2.     {
  3.         $username = trim($this->post('username'));
  4.         if ($username == '') {
  5.             $response = [
  6.                 'resp_error' => true,
  7.                 'resp_msg'   => 'Username tidak ditemukan.',
  8.             ];
  9.         } else {
  10.             $listData = $this->db->order_by('klinik_name', 'asc')->get('ehealth_klinik')->result();
  11.             foreach ($listData as $r) {
  12.                 $response[] = array(
  13.                     'resp_error'  => false,
  14.                     'resp_msg'    => 'success',
  15.                     'klinik_id'   => $r->klinik_id,
  16.                     'klinik_name' => trim($r->klinik_name),
  17.                 );
  18.             }
  19.         }
  20.  
  21.         $this->response($response, 200);
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement