jamboljack

Facility Model

Feb 1st, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. function update_data_facility() {
  2.         $id = $this->input->post('id');
  3.  
  4.         for($i=0; $i<count($id); $i++){
  5.             $status = !isset($this->input->post('check')[$id[$i]])?0:1;
  6.             $q = "UPDATE hom_facility SET facility_check='".$status."' WHERE facility_id= " . $id[$i];
  7.             $this->db->query($q);
  8.         }              
  9.     }
Add Comment
Please, Sign In to add comment