Jump to content


Photo

Call to undefined method stdClass::save()


  • Please log in to reply
No replies to this topic

#1 Sven70

Sven70

    Newbie

  • New Members
  • Pip
  • 8 posts

Posted 19 August 2008 - 03:18 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com