|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-05 12:44 UTC] thies@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 06:00:01 2025 UTC |
Try the following script and see that after attempting to fetch the row after the last in the result set, OCINumCols() no longer returns the right value. This problem did not exist in PHP 4.0.0 . Also notice the erroneous warning that is outputted. <br> <b>Warning</b>: failed to rollback outstanding transactions!: ORA-24324: servic e handle not initialized in <b>Unknown</b> on line <b>0</b><br> <? if(!function_exists("OCINLogon")) { $this->last_error="Oracle OCI API support is not available in this PHP configuration"; return(0); } putenv("ORACLE_HOME=/home/oracle/u01"); putenv("ORACLE_SID=dboracle"); if(($connection=OCINLogon("SYS","change_on_install","dboracle"))) { if(($cursor=OCINewCursor($connection))) { if(($statement=OCIParse($connection,"SELECT * FROM DUAL"))) { if(($result=OCIExecute($statement,OCI_COMMIT_ON_SUCCESS))) { echo OCINumCols($statement),"\n"; OCIFetch($statement); OCIFetch($statement); echo OCINumCols($statement),"\n"; OCIFreeCursor($statement); } else echo "Could not execute query\n"; } else echo "Could not parse query\n"; OCIFreeCursor($cursor); } else echo "Could not create new query cursor\n"; OCILogOff($connection); } else echo "Could not connect to Oracle server\n"; ?>