McGansWebsite/application/models/Employee_model.php

31 lines
627 B
PHP
Raw Permalink Normal View History

2023-01-05 12:19:39 +00:00
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Employee_model extends CI_Model {
public function __construct() {
parent::__construct();
}
function list_emp()
{
$this->db->select('*');
$this->db->from('employee');
$this->db->where(array('status'=>1));
$query = $this->db->get();
//echo $this->db->last_query();exit;
return $query;
}
function get_emp($id)
{
$this->db->select('*');
$this->db->from('employee');
$this->db->where(array('status'=>1,'id'=>$id));
$query = $this->db->get();
//echo $this->db->last_query();exit;
return $query;
}
}