Re: [PHP-PEAR] PHPLib and Pear merge

[email protected] (Bertrand Mansion) Wed, 07 Mar 2001 17:50:50 +0100
Newsgroups php.pear
Message-ID <B6CC2579.1AAF%[email protected]>
le 7/03/01 17:22, Chuck Hagenbuch à [email protected] a écrit :

> Quoting Paul Meagher <[email protected]>:
> 
>> 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?
> 
> If I want to nest sql queries, such that each inner query depends on a row of
> the outer query, I can do this in pear, because running a new query doesn't
> wipe away the current result set. But with phplib, I'd need to loop through
> the 
> entire outer query, store the results somewhere, and then do all of the inner
> queries.

$db = new DB_xxx;
$query1 = "select RRRR from XXXXX";
$db->query($query1);
while ($db->next_record()) {

    $db2 = new DB_xxx;
    $query2 = "UPDATE XXXX SET XXXX WHERE XXXX='".$db->f("RRRR")."'";
    $dbb->query($query2);
}

is this what you mean ? It works for me.

Bertrand Mansion
tapage.fr