add Employee Added

This commit is contained in:
gandhimathi Bharathirajan 2017-04-07 16:10:18 +05:30
parent 43dea9f661
commit 4a360b404e

View File

@ -63,8 +63,6 @@ class Employeedetails_model extends CI_Model
$this->db->limit($page, $segment);
$query = $this->db->get();
//print_r( $this->db->last_query());
@ -172,21 +170,17 @@ function addNewemployee($Employee)
return $query->result_array();
}
public function insert($data = array()){
$this->tableName = 'uploadphoto';
$this->primaryKey = 'id';
if(!array_key_exists("created",$data)){
$data['created'] = date("Y-m-d H:i:s");
}
if(!array_key_exists("modified",$data)){
$data['modified'] = date("Y-m-d H:i:s");
}
$insert = $this->db->insert($this->tableName,$data);
if($insert){
return $this->db->insert_id();
}else{
return false;
}
function checkMailExists($email)
{
$this->db->select('EmailId');
$this->db->from('T_Employee_Details');
$this->db->where('EmailId',$email);
$query = $this->db->get();
if ($query->num_rows > 0) {
return $query->result_array();
}
}
}
?>