Oracle record counting
| From: | Florian Clever | Date: | Thu, 05 Apr 2001 06:20:50 +0000 |
| Subject: | Oracle record counting | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-6524@lists.php.net to get a copy of this message | ||
Hi John,
your first example looks right. Can you send us the code you use to list
the records. I would expect the problem in there, because in your second
example basically the FetchStatement is not doing anything as the
statement has not been executed.
You need to loop through the result set array differntly after the
FetchStatement, then looping through the results without exec.
BTW: I had performance drops with the FetchStatement.
Florian
Von:
"Asendorf, John" <JAsendorf@lcounty.com>
Mi
20:35
Betreff:
Oracle record counting
An:
"Php-Windows (E-mail)" <php-windows@lists.php.net>
I'm attempting to work on a little oracle search...
My problem is that if I put the OCIExecute BEFORE the OCIFetchStatement
line, I get one error ( Warning: OCIFetchInto: ORA-01002: fetch out of
sequence in d:\InetPub\wwwroot\etc. ) but if I put OCIExecute AFTER the
OCIFetchStatement I get a different error (Warning: OCIFetchStatement:
ORA-24338: statement handle not executed in ).
In this order:
OCIExecute ( $stmt_search , OCI_DEFAULT );
$nrows = OCIFetchStatement( $stmt_search , $results );
echo "<P>There are $nrows records containing your criteria.</P>";
I get the number of records, but the I don't get the reords listed.
In this order:
$nrows = OCIFetchStatement( $stmt_search , $results );
echo "<P>There are $nrows records containing your criteria.</P>";
OCIExecute ( $stmt_search , OCI_DEFAULT );
I get the list of records, but no amount of records... I tried running
a
reset( $results); on it but that didn't seem to help...
Can someone help? Oracle 8.1.6 client (7.3.4 server) NT4 IIS4 PHP 4.0.4
CGI
Thanks,
John
---------------------
John Asendorf - jasendorf@lcounty.com
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Aut insanit homo, aut versus facit
--
Florian Clever
fc@clever-soft.com
http://www.Clever-Software-Solutions.de/
PGP Key @ ldap://certserver.pgp.net/
"Always listen to experts. They'll tell you what can't be done, and why.
Then do it. " -- Robert A. Heinlein