OCI8 Function Clarification
| From: | Randall Barber | Date: | Wed, 09 Jan 2002 16:27:40 +0000 |
| Subject: | OCI8 Function Clarification | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15566@lists.php.net to get a copy of this message | ||
I have a simple SELECT statement that returns more than one row.
When I do something like this:
do
{
.....
} while (OCIFetch($qryResult) != false);
I get an "Out of sequence" error on OCIFetch. So then I tried this:
$numRows = OCIRowCount($qryResult);
for($i = 0; $i < $numRows; $i++)
{
OCIFetch($qryResult);
......
}
Now I get 0, for the row count. If I call OCIFetch once, before the OCIRowCount, I get a value of 1
(which makes sense I guess, since it will only fetch one row at a time).
*** How do I step through a SELECT result set?
Thanks
RDB