add Employee Added
This commit is contained in:
parent
43dea9f661
commit
4a360b404e
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user