add Employee Added
This commit is contained in:
parent
43dea9f661
commit
4a360b404e
@ -63,8 +63,6 @@ class Employeedetails_model extends CI_Model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->db->limit($page, $segment);
|
$this->db->limit($page, $segment);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
//print_r( $this->db->last_query());
|
//print_r( $this->db->last_query());
|
||||||
@ -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