[eluser]bibos[/eluser]
Hi,
I have a problem when trying to update data in my MySQL DataBase, the update method look like :
Code:
function UpdateUser($option=array()){ //required data
if(!$this->_required(array('F_IMGH_USER_ID'), $options
)) return false;
if(isset($option['F_IMGH_USER_NAME'])) $this->db->set('F_IMGH_USER_NAME',$option['F_IMGH_USER_NAME']);
if(isset($option['F_IMGH_USER_PNAME'])) $this->db->set('F_IMGH_USER_PNAME',$option['F_IMGH_USER_PNAME']);
if(isset($option['F_IMGH_USER_DAT_NAISS']))
$this->db->set('F_IMGH_USER_DAT_NAISS',$option['F_IMGH_USER_DAT_NAISS']);
if(isset($option['F_IMGH_USER_EMAIL']))
$this->db->set('F_IMGH_USER_EMAIL',$option['F_IMGH_USER_EMAIL']);
if(isset($option['F_IMGH_USER_LOGIN']))
$this->db->set('F_IMGH_USER_LOGIN',$option['F_IMGH_USER_LOGIN']);
if(isset($option['F_IMGH_USER_PASSWORD']))
$this->db->set('F_IMGH_USER_PASSWORD',$option['F_IMGH_USER_PASSWORD']);
if(isset($option['F_IMGH_USER_ACTIVE']))
$this->db->set('F_IMGH_USER_ACTIVE',$option['F_IMGH_USER_ACTIVE']);
if(isset($option['F_IMGH_USER_LEVEL']))
$this->db->set('F_IMGH_USER_LEVEL',$option['F_IMGH_USER_LEVEL']);
if(isset($option['F_IMGH_USER_LAST_LOGIN']))
$this->db->set('F_IMGH_USER_LAST_LOGIN',$option['F_IMGH_USER_LAST_LOGIN']);
$this->db->where('F_IMGH_USER_ID',$option['F_IMGH_USER_ID']);
$this->db->update('fimgusers');
return $this->db->affected_rows();
}
and in the login method of the user model, i do :
Code:
...
if($this->UpdateUser($data)){
return true;
}else{
return false;
}
...
but when i run my application nothing hapend! thhe login method is called but it return false and the update process is never done!!
Can some one help me to fix this
THKS