Jump to content

Call to undefined method stdClass::save()


Sven70

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.