Re: multiple result sets from DB_common::execute()
| From: | Justin Patrin | Date: | Mon, 26 Jul 2004 20:34:33 +0000 |
| Subject: | Re: multiple result sets from DB_common::execute() | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-13855@lists.php.net to get a copy of this message | ||
On Sun, 25 Jul 2004 12:41:59 -0400, Al Partis <alpartis@thundernet.com> wrote:
> Is it possible to receive multiple result sets from a call to DB_common::execute()?
>
> I am calling a DB2 stored proc over ODBC that returns multiple result sets. Is this possible
> through PHP/PEAR:DB? Based on my reading of the documentation, this method returns a DB_result
> object and nothing indicates to me that this object is a container class that could contain multiple
> result sets. Am I reading this wrong?
>
A DB_Result has fetching methods. Please look at the documentation or
a tutorial about how to loop through the result set:
$db = DB::connect($dsn);
$result = $db->query('SELECT ...');
while($record = $result->fetchRow()) {
//do something with $record
}
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--