Advertisement
timonte

app_admin

Apr 8th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. class App_Admin extends CI_Model {
  5.  
  6. function __construct()
  7. {
  8. parent::__construct();
  9.  
  10. }
  11.  
  12. function insert($table= '', $data= '')
  13. {
  14. $this->db->insert($table, $data);
  15. }
  16.  
  17. function get_all ($table)
  18. {
  19. $this->db->from($table);
  20.  
  21. return $this->db->get();
  22. }
  23.  
  24. function get_where($table = null, $where = null){
  25.  
  26. $this->db->from($table);
  27. $this->db->where($where);
  28.  
  29. return $this->db->get();
  30. }
  31.  
  32. function update($table = null, $data = null, $where = null)
  33. {
  34. $this->db->update($table, $data, $where);
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement