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

class MNakes extends CI_Model{

  public function __construct()
  {
    parent::__construct();
    //Codeigniter : Write Less Do More
  }

  public function cekNakes($username)
  {
    $this->db->where("email", $username);
    $this->db->or_where("no_hp", $username);
    return $this->db->get("nakes");
  }
  public function cekNakesEmail($username)
  {
    $this->db->where("email", $username);
    return $this->db->get("nakes");
  }
  public function cekNakesNoHp($username)
  {
    $this->db->where("no_hp", $username);
    return $this->db->get("nakes");
  }

  public function list_nakes()
  {
    return $this->db->get("nakes");
  }

  public function detail_nakes($idnakes)
  {
    $this->db->where("idnakes", $idnakes);
    return $this->db->get("nakes");
  }

}
