Advertisement
anjhar

m_auth

Mar 14th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?php if(!defined('BASEPATH')) exit('Keluar dari sistem');
  2. class M_auth extends CI_Model {
  3. function __construct()
  4. {
  5. parent::__construct();
  6. }
  7. function cek_pengguna($username, $password){
  8. $this->db->where('username', $username);
  9. $this->db->where('password', $password);
  10. $this->db->where('status', 1);
  11. $query = $this->db->get('users');
  12. return $query;
  13. }
  14. function update_data_user($data, $username){
  15. $this->db->where('username', $username);
  16. $this->db->update('users', $data);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement