DataObject DB connection failing

From: Date: Wed, 11 Dec 2002 13:48:54 +0000
Subject: DataObject DB connection failing
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2941@lists.php.net to get a copy of this message
Hi all, Just found this newsgroup and hope that I can get some clues on using PEAR stuff.... it's the DataObject I'm having issues with. I've created all the extended classes based on my database tables. The problem is actually doing the connection when I call a method such as find() or get(). I just get the error message "DB Error: not found". The manual was a little misleading/non-descriptive on how you actually go about using the DataObjects from any scripts/private classes. The manual mentions calling:- $options = &PEAR::getStaticProperty('DB_DataObject','options'); DB_DataObject::debugLevel(5); $config = parse_ini_file('redbox_databases.ini', TRUE); var_dump($config); $options = $config['DB_DataObject']; Where should this be called? My code that creates instances of DataObjects is, itself, within classes so where should I call this initialisation code? What happens to the $options variable that the init code finishes with? Does this need to be global if I am calling extended DataObject classes from within my own class methods? The manual isn't great for getting people started, I think. Could anybdy explain how things fit together? Regards, -- Mike Carter [web developer] tel: 01925 758229 // fax: 01925 758023 // web: www.koa.uk.com This message is confidential. Unless you are the named addressee or their delegated representative you may not use, disclose, or copy the contents of the e-mail. If you are not the named addressee please notify the sender immediately and delete the material from your computer. Any views or opinions contained in this e-mail are solely those of the author unless expressly stated otherwise

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