Re: [PHP-PEAR] PHPLib and Pear merge

[email protected] (Björn Schotte) Wed, 7 Mar 2001 17:27:42 +0100
Newsgroups php.pear
Message-ID <[email protected]>
* Paul Meagher wrote:
> Could you elaborate upon this limitation with a simple example of what you
> can't do with phplib and what you can do with PEAR:DB?

PHPLIB:

$db = new DB_my;
$db->query("select foo from bar");
while ($db->next_record()) {
	$id = $db->f("foo");

	$db->query("select bar from foo");
	while ($db->next_record()) {
		.
		.
		.
	}
}

that doesn't work. Instead, you have to do:

$db = new DB_my;
$db1 = new DB_my;
$db->query("select foo from bar");
while ($db->next_record()) {
	$id = $db->f("foo");

	$db1->query("select bar from foo");
	while ($db1->next_record()) {
		.
		.
		.
	}
}


-- 
Björn Schotte                                      [email protected]
http://rent-a-phpwizard.de/                   [email protected]

Software dev advocate: http://www.advogato.org/person/baerli/