add Employee Added

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

View File

@ -59,9 +59,7 @@ class Employeedetails_model extends CI_Model
OR Dep.DepartmentName LIKE '%".$searchText."%'
)";
$this->db->where($likeCriteria);
}
}
@ -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();
}
}
}
?>