|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-21 10:48 UTC] tony2001@php.net
[2004-12-21 14:56 UTC] amonw at hotmail dot com
[2004-12-21 15:05 UTC] tony2001@php.net
[2004-12-22 09:19 UTC] amonw at hotmail dot com
[2004-12-22 10:01 UTC] tony2001@php.net
[2004-12-23 13:26 UTC] amonw at hotmail dot com
[2004-12-23 18:16 UTC] tony2001@php.net
[2004-12-24 03:08 UTC] amonw at hotmail dot com
[2005-03-30 23:06 UTC] tony2001@php.net
[2005-04-04 09:27 UTC] amonw at hotmail dot com
[2005-04-05 17:55 UTC] tony2001@php.net
[2005-04-26 04:20 UTC] amonw at hotmail dot com
[2005-04-28 12:56 UTC] sniper@php.net
[2005-04-29 05:15 UTC] amonw at hotmail dot com
[2005-05-12 12:37 UTC] tony2001@php.net
[2005-05-17 07:09 UTC] amonw at hotmail dot com
[2005-05-18 00:14 UTC] sniper@php.net
[2005-05-23 04:42 UTC] amonw at hotmail dot com
[2005-05-23 10:13 UTC] tony2001@php.net
[2005-05-25 06:36 UTC] amonw at hotmail dot com
[2005-06-02 15:17 UTC] tony2001@php.net
[2005-06-08 12:28 UTC] amonw at hotmail dot com
[2005-06-08 12:37 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
Description: ------------ ocicommit not working in the following code when connected to oracle 8.1.7 . The oddest thing is I can avoid this by doing any one of the following: 1. don't use the user defined function "query", and used it's content to replace the function calls or 2. use different veriable name for the two connections or 3. use different veriable name for the two query results or 4. add $statement=anything or unset($statement) before the second "$statement=query($c,$sql)" configure command(from phpinfo()): './configure' '--with-apxs' '--with-gd' '--with-oci8=shared' '--with-zlib' '--with-jpeg-dir' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-ttf' '--enable-ftp' Reproduce code: --------------- <?php function query($conn,$sqlstr) { $statement=ociparse($conn,$sqlstr); ociexecute($statement,OCI_DEFAULT); return $statement; } dl('oci8.so'); $c=ocilogon('user','pwd'); $sql="select sysdate from dual"; $statement=query($c,$sql); $c=ocilogon('user','pwd'); $sql="delete from info_user where device_number='1234567890'"; $statement=query($c,$sql); if(!ocicommit($c)) { $error = OCIError($c); echo 'Commit failed. Oracle reports: ' . $error['message']; } print("$sql :".ocirowcount($statement).' records updated.'); ?> Expected result: ---------------- Prints out "delete from info_user where device_number='1234567890' :x records deleted" and all records with device_number='1234567890' should be deleted. Actual result: -------------- Prints out "delete from info_user where device_number='1234567890' :x records deleted" but no records was deleted.