problem about OCINewDescriptor()
| From: | Kim, Sung-Sik | Date: | Wed, 21 Jul 1999 14:23:54 +0000 |
| Subject: | problem about OCINewDescriptor() | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4745@lists.php.net to get a copy of this message | ||
This script works good in (php3.0.12 + redhat6 + oracle8.0.5)
but doesn't in (php4.0b2 + redhat6 + oracle8.0.5)
i get following error message.
-------------------------------------------------------------------
OCIDebug: oci8_open_server new conn=2000 dname=
OCIDebug: oci8_open_user new sess=1000 user=scott
OCIDebug: oci8_do_connect: id=1
OCIDebug: oci8_parse "select rowid from emp" id=2 conn=1
OCIDebug: OCINewDescriptor: new descriptor for 0 -> 81c78c0
Warning: add_assoc_function() is no longer supported in /home/php/public_html/PHP/test.php on line 6
Warning: add_assoc_function() is no longer supported in /home/php/public_html/PHP/test.php on line 6
-------------------------------------------------------------------
<?php
ociinternaldebug(1);
$conn = OCILogon("scott", "tiger");
$stmt = OCIParse($conn,"select rowid from emp");
$rowid = OCINewDescriptor($conn,OCI_D_ROWID); // LINE 6 !!!!!!!!!!!!!!!!!!!!!!!!!!
OCIDefineByName($stmt,"ROWID",&$rowid);
OCIExecute($stmt);
while ( OCIFetch($stmt) ) {
$nrows = OCIRowCount($stmt);
$del = OCIParse($conn,"delete from emp where ROWID = :rid");
OCIBindByName($del,":rid",&$rowid,-1,OCI_B_ROWID);
OCIExecute($del);
print "$nrows<BR>";
}
$nrows = OCIRowCount($stmt);
print "$nrows deleted...\n";
OCIFreeStatement($stmt);
OCILogoff($conn);
?>