Re: DataObject - DB Error : not found

From: Date: Wed, 17 Jul 2002 11:21:43 +0000
Subject: Re: DataObject - DB Error : not found
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1906@lists.php.net to get a copy of this message
Thanks! I have put the lines altogether, but the result is the same; "DB Error: not found". Here is my codes, <?php require_once ('PEAR.php'); require_once ('DB\DataObject.php'); DB_DataObject::debugLevel(5); $options = &PEAR::getStaticProperty('DB_DataObject','options'); $config = parse_ini_file('soccer.ini', TRUE); $options = $config['DB_DataObject']; require_once ('Competition.php'); $comp = new DataObjects_Competition; $comp->get(3); print_r($comp); ?> And I have this in php error log, 'PHP Notice: Undefined index: DB_DataObject in c:\project\testing\pear\dataobjects\test1.php on line 9' Sorry to bother you with this silly things! :-( Cheers, William ----- Original Message ----- From: "Alan Knowles" <alan@akbkhome.com> To: "William" <william@adtio.com> Cc: <pear-general@lists.php.net> Sent: Wednesday, July 17, 2002 6:38 PM Subject: Re: [PEAR] DataObject - DB Error : not found > Have you loaded the configuration: > http://pear.php.net/manual/en/packages.database.db-dataobject.introduction.p hp > > | require_once('PEAR.php'); > $options = &PEAR::getStaticProperty('DB_DataObject','options'); > $config = parse_ini_file('example.ini',TRUE); > $options = $config['DB_DataObject']; > > > // use one of the extended classes. > > require_once('DataObjects/Person.php'); > > I guess the other examples should illustrate this somehow > > you can always turn on debugging to get more details about what is going on > > DB_DataObject::debugLevel(5); > > regards > alan > | > > > William wrote: > > >Hi, > > > >I follow the manual on the pear.php.net and runs these > > > ><?php > >require_once('Person.php'); > > > >$person = new DataObjects_Person; > >$person->get(1); > >print_r($person); > >?> > > > >I only have 'DB Error : not found' printed on the paper. What's the meaning > >of it? > >I am sure the table and record are exists there and I made the DataObject > >Classes by Auto Builder. > > > >Thanks in advance! > > > >Cheers, > >William > > > > > > > > > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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