Re: DB stuff

From: Date: Mon, 26 Mar 2001 20:07:23 +0000
Subject: Re: DB stuff
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-103@lists.php.net to get a copy of this message
On Sun, 25 Mar 2001, Colin Viebrock wrote: > While we are at it, can we add this to DB_result: > > function fetchObject($fetchmode = DB_FETCHMODE_DEFAULT) > { > $res = $this->fetchInto ($arr, $fetchmode); > if (is_object($res)) { > return $res; > } > return (object)$arr; > } > > I've been missing mysql_fetch_object since switching to PEAR. :) > What about this ? $data = (object) $dbh->fetchRow($result, DB_FETCHMODE_ASSOC); Adding a new function that does the same thing as this simple line is just ridiculous. Am I missing something here ? Joao -- João Prado Maia <jpm@phpbrasil.com> http://phpbrasil.com - php com um jeitinho brasileiro -- Contribua com o projeto de tradução do manual online do PHP http://phpbrasil.com/traducao.php --

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