Extending DB_DataObject

From: Date: Thu, 31 Aug 2006 01:29:45 +0000
Subject: Extending DB_DataObject
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25019@lists.php.net to get a copy of this message
Hi all, I'm kind of new to the PEAR packages, so please bear with me. I am using php5/mysql5 and am writing an application front-end to communicate with a database that contains several hundred thousand rows of data. That is how I stumbled upon DO. My question is it possible to extend DO past one child? For instance: MyDataObject_Base extends DB_DataObject MyDataObject_BaseExtender extends MyDataObject_Base Here's what I'm running into. At the beginning of the application, it calls the config options from a config.ini file. If I call a class extending DB_DataObject directly, the options are set. If I call a 'Base' class which itself extends DB_DataObject, the options aren't being set/retained. Any help is appreciated on this. Or if I can offer more info, I'd love to. Derek On 8/23/06 10:03 PM, "Chris Domigan" <cdomigan@gmail.com> wrote: > > Hi everyone, > > I'm having trouble working out how to test for a null value using > DB_DataObject. > > If a field is set to NULL, the corresponding property in the data object is > "", ie blank and not "null". Obviously it's very handy to be able to > differentiate between an empty string and null. > > I've tried using the special sql casts that DB_DataObject supports, but this > only lets me set null values, which I can already do anyway using > $object->property = "null". > > Any help would be appreciated :) > > Chris

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