Welcome Guest, Not a member yet? Register   Sign In
how to update using codeigniter and doctrine getting error Call to undefined function save()
#1

[eluser]adityajoshi[/eluser]
my controller
$user = $this->session->userdata('userid');
$e = new Profile();
$e->user_id = $this->session->userdata('userid');
$e->Name = $this->input->post('pname');
$e->Sex = $this->input->post('sex');
$e->City = $this->input->post('city');
$e->DOB = $this->input->post('stats');
$e->Interests = $this->input->post('interests');
$e->image_loc = $u->image_loc = $newfilepath;
$e = Doctrine::getTable('Profile')->find($user);
$e-save();
$this->load->view('profile');


Call to undefined function save()


my model is
<?php
class Profile extends Doctrine_Record {

public function setTableDefinition() {
$this->hasColumn('user_id', 'string', 255);
$this->hasColumn('Name', 'string', 255);
$this->hasColumn('City', 'string', 255);
$this->hasColumn('Sex', 'string', 255);
$this->hasColumn('DOB','date');
$this->hasColumn('image_loc','string',255);
$this->hasColumn('Interests', 'string', 255);


}

public function setUp() {
$this->setTableName('user_profile');
$this->actAs('Timestampable');
}


}

any help




Theme © iAndrew 2016 - Forum software by © MyBB