DB_DataObject

From: Date: Tue, 22 Mar 2005 17:33:05 +0000
Subject: DB_DataObject
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18232@lists.php.net to get a copy of this message
Okay, This code get's called multiple times through a Smarty function on a single page. $top_cat = new DataObjects_resource_keyword_cats; $top_cat->short_name = $cfg['domain']; $top_cat->find(true); The first time it works and the second time gives this: |*dataobjects_resource_keyword_cats: __find:* 1| |*dataobjects_resource_keyword_cats: CONNECT:* USING CACHED CONNECTION| |*dataobjects_resource_keyword_cats: CONNECT:* USING CACHED CONNECTION| |*dataobjects_resource_keyword_cats: CONNECT:* USING CACHED CONNECTION| |*dataobjects_resource_keyword_cats: CONNECT:* USING CACHED CONNECTION| |*dataobjects_resource_keyword_cats: QUERY:* SELECT * FROM resource_keyword_cats WHERE resource_keyword_cats.short_name = '' | DB Error: no database selected So I even changed the code to $top_cat = new DataObjects_resource_keyword_cats; $top_cat->database('mysites'); $top_cat->short_name = $cfg['domain']; $top_cat->find(true); But it still says the same thing. I have define('DB_DATAOBJECT_NO_OVERLOAD', 1); set. I was just using $top_cat = &DB_DataObject::staticGet('DataObjects_resource_keyword_cats', 'short_name', $cfg['domain']); and it gave the same result (worked first time, not others). -- Rob Roy Barreca __________________________________________________ Electronic Insight ..... a web development company Email .................. rob@electronicinsight.com Website ................ www.electronicinsight.com

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