Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-17 Thread ZeYuan Zhang
Thanks everybody. To: Christopher Jones thanks for your code. I have run your code. For the sample you supplied, the oci_commit really returns false. But if I add a primary key constraint to t_tab.x, and then run the script, the oci_commit returns true!strange... So do I need check all the oci_ex

Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-16 Thread Christopher Jones
> echo "Second Insert\n"; > $s = oci_parse($c, "insert into t_tab values ( 1,-1)"); > $r = oci_execute($s, OCI_DEFAULT); // Explore the difference with and without OCI_DEFAULT > if (!$r) { > $m = oci_error($s); > trigger_error('Could not execute: '. $m['message'], E_USER_ERROR); > } > $

Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-16 Thread Christopher Jones
Chris wrote: Christopher Jones wrote: Chris wrote: > ZeYuan Zhang wrote: >> Hi there. >> >> Why oci_commit function always returns true even when the transaction >> fails. >> I just copied the code in the php manual [Example 1636. oci_commit() >> example], >> and runned it, the situa

Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-16 Thread Chris
Christopher Jones wrote: Chris wrote: > ZeYuan Zhang wrote: >> Hi there. >> >> Why oci_commit function always returns true even when the transaction >> fails. >> I just copied the code in the php manual [Example 1636. oci_commit() >> example], >> and runned it, the situation is as follo

Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-16 Thread Christopher Jones
Chris wrote: > ZeYuan Zhang wrote: >> Hi there. >> >> Why oci_commit function always returns true even when the transaction >> fails. >> I just copied the code in the php manual [Example 1636. oci_commit() >> example], >> and runned it, the situation is as follows: >> >> * The statements do comm

Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-16 Thread Christopher Jones
ZeYuan Zhang wrote: > Hi there. > > Why oci_commit function always returns true even when the transaction fails. > I just copied the code in the php manual [Example 1636. oci_commit() example], > and runned it, the situation is as follows: > > * The statements do commit at the moment when oci_comm

Re: [PHP-DB] oci_commit always returns true even when the transaction fails.

2010-03-16 Thread Chris
ZeYuan Zhang wrote: Hi there. Why oci_commit function always returns true even when the transaction fails. I just copied the code in the php manual [Example 1636. oci_commit() example], and runned it, the situation is as follows: * The statements do commit at the moment when oci_commit executes