Re: db asbstraction

From: Date: Thu, 25 Jan 2001 22:17:38 +0000
Subject: Re: db asbstraction
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1174@lists.php.net to get a copy of this message
On Thu, 25 Jan 2001, André Langhorst wrote: > > # my way > > > > $DB = new DB(); > > $DB->connect($host,$db,$user,$pass); > > $DB->query("SELECT name FROM table"); > > if ($DB->numrows()>0) { > > while ($DB->fetchRow()) { > > echo $DB->field('name'); > > } > > } > > ok. and what do you do if someone is working on several result set > concurrently? PEAR is fine then, you are not. > Indeed, you would need to create yet a new object to do nested result sets inside that $DB->numrows block. Joao -- João Prado Maia <jpm@phpbrasil.com> http://phpbrasil.com - php com um jeitinho brasileiro

« previous php.pear (#1174) next »