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."%'
|
OR Dep.DepartmentName LIKE '%".$searchText."%'
|
||||||
)";
|
)";
|
||||||
$this->db->where($likeCriteria);
|
$this->db->where($likeCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -172,21 +170,17 @@ function addNewemployee($Employee)
|
|||||||
return $query->result_array();
|
return $query->result_array();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function insert($data = array()){
|
function checkMailExists($email)
|
||||||
$this->tableName = 'uploadphoto';
|
{
|
||||||
$this->primaryKey = 'id';
|
$this->db->select('EmailId');
|
||||||
if(!array_key_exists("created",$data)){
|
$this->db->from('T_Employee_Details');
|
||||||
$data['created'] = date("Y-m-d H:i:s");
|
$this->db->where('EmailId',$email);
|
||||||
}
|
|
||||||
if(!array_key_exists("modified",$data)){
|
$query = $this->db->get();
|
||||||
$data['modified'] = date("Y-m-d H:i:s");
|
|
||||||
}
|
if ($query->num_rows > 0) {
|
||||||
$insert = $this->db->insert($this->tableName,$data);
|
return $query->result_array();
|
||||||
if($insert){
|
}
|
||||||
return $this->db->insert_id();
|
|
||||||
}else{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user