[eluser]GamingFusion[/eluser]
I have a site that will allow a user to update their profile.
The problem im having is that it says the my updateProfile() function in my database model is there even though it is.
Why? i loads other functions like updateShow()
ERROR
Quote:Fatal error: Call to undefined method Database::updateProfile() in /Users/User1/Sites/ci/system/application/controllers/members.php on line 307
Model
Code:
function updateProfile($id)
{
$data = array(
'first' => $this->input->post('first'),
'last' => $this->input->post('last'),
'username' => $this->input->post('username'),
'position' => $sthis->input->post('position'),
'bio' => $this->input->post('bio'));
$this->db->set($data);
$this->db->where('id', $id);
$query = $this->db->update('users');
if ($query) {
return $data['updated'] = TRUE;
return $query;
}else{
return $data['updated'] = FALSE;
}
}
controller
Code:
function update()
{
$this->database->updateProfile($this->uri->segment(3)); //this is line 307
}