Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. public function create_e_matriculas($arraycampos = NULL)
  2.     {
  3.         // bail if the group name already exists
  4.         $existing_e_matriculas = $this->db->get_where($this->tables['e_matriculas'], $arraycampos)->num_rows();
  5.  
  6.        
  7.         if($existing_e_matriculas !== 0)
  8.         {
  9.             $this->ion_auth->set_error('e_matriculas_already_exists');
  10.             return FALSE;
  11.         }
  12.        
  13.         // insert the new group
  14.         $this->db->insert($this->tables['e_matriculas'], $arraycampos);
  15.         $e_matriculas_id = $this->db->insert_id();
  16.  
  17.         // report success
  18.         $this->set_message('e_matriculas_creation_successful');
  19.         // return the brand new group id
  20.         return $e_matriculas_id;
  21.     }
  22.     public function update_e_matriculas($id, $arraycampos)
  23.     {
  24.         $this->db->update($this->tables['e_matriculas'], $arraycampos, array('id' => $id));
  25.  
  26.         $this->ion_auth->set_message('barloc_update_successful');
  27.  
  28.         return TRUE;
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement