Re: db abstraction: pass by reference versus return

From: Date: Fri, 12 Jul 2002 08:58:58 +0000
Subject: Re: db abstraction: pass by reference versus return
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7680@lists.php.net to get a copy of this message
On Fri, Jul 12, 2002 at 10:08:00AM +0200, Lukas Smith wrote: > Ah sorry, > maybe I should have made this clearer: > I am talking about the new DB abstraction packages MDB > () > > So this will not affect current PEAR DB or Metabase users. > Moreover there is a wrapper for PEAR DB and Metabase that will ensure > BC. > > Therefore its really not all that much a question of how it used to be, > but how we want it to be in the future I am sorry, now I looked through my pear-dev archive and I have read messages related to MDB development. I looked into sources also now and it seems very easy to use. Good work. By the way - I do not like to check if return value is error object, e.g. instead of checking if $dbh->query() every time, I use both: set_error_handler('php_handle_error'); PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'pear_handle_error'); The code is then clearer. I hope this would work with MDB (I've seen you are using raiseError(), then it should work). Best regards, -- Piotr Klaban

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