DB_DataObject

From: Date: Fri, 20 Aug 2004 14:29:43 +0000
Subject: DB_DataObject
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14197@lists.php.net to get a copy of this message
Hello, I want to use the DB_DataObject package with MySQL. In my database, I have one table : 'BOOK'. All my classes (based on my database) have been generated with the CreateTables.php. When I try to write the following code, i have always the same error : « DB_DataObject Error: factory could not find class from book ». I look for a solution and a good explication because on my error should help me later. <?php require_once('DB/DataObject.php'); require('Config.php'); require_once('include/classes/ObjectBase/Book.php'); $book = &DB_DataObject::factory('book'); if(strcasecmp('db_dataobject_error',get_class($book))==0){ echo $book->getMessage(); } else{ $book->get(1); echo 'This book is called: '.$book->title; } ?> PS : sorry for my poor english _________________________________________ Romain FEVRE Service Ingénierie des Systèmes d'Information FALCO SA 22, route de la Gare BP1, Neuvillas 87510 Saint-Jouvent Téléphone : 05 55 08 03 30 Télécopie : 05 55 75 65 38 E.mail : rfevre@falco.fr <mailto:rfevre@falco.fr> Site Web : http://www.falco.fr

« previous php.pear.general (#14197) next »