Re: [PHP-PEAR] PHPLib and Pear merge
[email protected] (Matthias Mohr) Wed, 7 Mar 2001 17:31:19 +0100 (MET)
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
Hello, On Wed, 7 Mar 2001, Chuck Hagenbuch wrote: > 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. or you do something like: $db1=new DB(); $db2=new DB(); $db1->query($outer); while ($db1->next_record()) { $db2->query($inner); while ($db2->next_record()) { [...stuff that uses $db1- and $db2-results...] } } ... ups, wrong list :) regards messju mohr > > -chuck > > -- > Charles Hagenbuch, <[email protected]> > "Live, from Washington, where the doctors were telling us what they did, and > did not, do with Vice President Cheney." -Dan Rather