ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

how to update using codeigniter and doctrine getting error Call to undefined function save()

August 29, 2011 6:54pm

Subscribe [1]
  • #1 / Aug 29, 2011 6:54pm

    adityajoshi

    39 posts

    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

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases