<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Tbl_login_model extends CI_Model
{

    public function auth($username, $password)
    {
        $query = $this->db->where('username', $username)->where('password', $password)->get('sistem_login');
        return $query;
    }

    public function authgoogle($email)
    {
        $query = $this->db->where('email', $email)->where('status_akun', 'AKTIF')->get('sistem_login');
        return $query;
    }

    public function update_session($iduser, $data)
    {
        $query = $this->db->where('id', $iduser)->update('sistem_login', $data);
    }
}
