Jump to content

Recommended Posts

Hi,

 

I am new with PHP and MySql!

 

I have created a small PHP program which gets values and now I tried to put them with adodb active Records into my

database!

 

Here comes a part of my program:

  ...

  include('adodb/adodb.inc.php');

  include('adodb/adodb-active-record.inc.php');

  include 'adodb/adodb-errorpear.inc.php';

  include 'adodb/tohtml.inc.php';

  ...

  $db = ADONewConnection($dbserver);

  ADOdb_Active_Record::SetDatabaseAdapter($db);

  @$db->Connect($host, $user, $password, $database);

  class Vehicle extends ADOdb_Active_Record{}

 

    $vehicle = new Vehicle('t_vehicle');

    $vehicle->manufacturer = $manufacturer;

    $vehicle->model  = $model;

    $vehicle->color  = $color;

    $vehicle->price  = $price;

    $vehicle->save();

 

When I now run my program, then I got following error message:

Fatal error: Call to undefined method stdClass::save() in ...

 

Does anybody has a idea?

Did I missed something?

 

Any help would be welcome!

 

Thanks

Sven

Link to comment
https://forums.phpfreaks.com/topic/120415-call-to-undefined-method-stdclasssave/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.