Re: Extending PEAR DB

From: Date: Tue, 24 Apr 2001 12:12:05 +0000
Subject: Re: Extending PEAR DB
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-305@lists.php.net to get a copy of this message
I can't say that I had considered setting it up to allow casting to an arbitrary object type, but that is an interesting thought, I think I'll work on it. Initially, though, I've got to get something together to replicate mysql_fetch_object(), which had been my original intent. I felt the best way to do that was to set up a fetch mode for objects, then I could use the various get functions to retrieve data. I'll spend some time today working out the best way to handle this to acheive maximum functionality, and let you know what I come up with later. NOTE: I'm at GMT-5:00 and I have to go to work for several hours. I should be able to check this news server again in about eleven hours or so, so I'll follow with suggestions, etc... then. One thing that would be helpful, I haven't ever had need to cast to an object type in php, any information beyond the bit in "type juggling" would be appriciated. Thanks, Benjamin R. Webb Stig S?ther Bakken <ssb@fast.no> wrote: > ["Benjamin R. Webb" <brwebb@transmuto.com>] >> All, >> >> I would like to add a fetchmode to DB, specifically an object [...Deleted for clarity...] > Try this: > $obj = (object)$result->fetchRow(); > That being said, having a fetch mode for objects could be very useful > if you can specify what class or object to use. > - Stig > -- > Stig S?ther Bakken <ssb@fast.no> > Fast Search & Transfer ASA, Trondheim, Norway > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net > For additional commands, e-mail: pear-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.pear.dev (#305) next »