From 4a360b404e9c7113d64b815809081565a197187b Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Fri, 7 Apr 2017 16:10:18 +0530 Subject: [PATCH] add Employee Added --- application/models/Employeedetails_model.php | 30 ++++++++------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/application/models/Employeedetails_model.php b/application/models/Employeedetails_model.php index 1a04d634..09b149e3 100644 --- a/application/models/Employeedetails_model.php +++ b/application/models/Employeedetails_model.php @@ -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(); + } } } ?> \ No newline at end of file