Advertisement
Guest User

Untitled

a guest
Apr 16th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public function insert_location()
  2. {
  3. $this->load->helper('url');
  4.  
  5. $this->db->select('*');
  6. $query = $this->db->get('locaties');
  7. $num = $query->num_rows();
  8.  
  9. $data = array(
  10. 'id' => ($num + 1),
  11. 'name' => $this->input->post('locatie')
  12. );
  13.  
  14. return $this->db->insert('locaties', $data );
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement