Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9222033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:43:09+00:00 2026-06-18T03:43:09+00:00

I would like to save data in Doctrine 2.3 unfortunately I get error also

  • 0

I would like to save data in Doctrine 2.3 unfortunately I get error also if it`s possible I need good tutorial for this because in my opinion documentation is not useful.

My last topic:

Controller error in CodeIgniter and Doctrine tutorial

Eroor:

Fatal error: Call to undefined method User::save() in C:\wamp\www\nauka\application\controllers\hello.php on line 19

Picture with option save:

enter image description here

Model

enter image description here

ripa I make this what you want but I get error:

Parse error: parse error, expecting `T_FUNCTION’ in C:\wamp\www\nauka\application\controllers\hello.php on line 8

<?php
    // system/application/controllers/hello.php

    $this->load->model("user");

    class Hello extends CI_Controller {

            $this->user->setTableDefinition();

        function world() {
            echo "Hello CodeIgniter!";
        }

        function user_test() {

            $u = new User;
            $u->username = 'johndoe';
            $u->password = 'secret';
            $u->first_name = 'John';
            $u->last_name = 'Doe';
            $u->save();

            $u2 = new User;
            $u2->username = 'phprocks';
            $u2->password = 'mypass';
            $u2->first_name = 'Codeigniter';
            $u2->last_name = 'Doctrine';
            $u2->save();

            echo "added 2 users";
                    }

}

?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:43:10+00:00Added an answer on June 18, 2026 at 3:43 am
     <?php
    
    
    
    class Hello extends CI_Controller {
    
            $this->user->setTableDefinition();
    
        function world() {
            echo "Hello CodeIgniter!";
        }
    
        function user_test() {
    
            $this->load->model("user");
            $u["username"] = 'johndoe';
            $u["password"] = 'secret';
            $u["first_name"] = 'John';
            $u["last_name"] = 'Doe';
            $this->user->save($u);
    
    
    
            echo "added 1 users";
                    }
    
        }
    
    ?>
    

    can get help from http://ellislab.com/codeigniter/user-guide/general/models.html. see “table of contents” of this link. you will get everything related to codeigniter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like get data from this webpage through a terminal, the page is
My Flash movie would like communicate with MySQL server to fetch and save data
I have a Data Access Object TransactionDao. When you call TransactionDao.Save(transaction) I would like
Does Spring support SharePoint? In my Spring Application, i would like to SAVE data
I have some data that I would like to save to a MAT file
I would like to save data to database only once per user, based on
i am new developer in android applications.i would like to save the data using
Hey. I would like to save sensitive user data to my apps sandbox but
The problem: I have a data entry form. I would like to save the
I would like to save data in cookies (user name, email address, etc...) but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.