Re: Oracle Commits
| From: | Jochem Maas | Date: | Thu, 22 Jun 2006 22:44:02 +0000 |
| Subject: | Re: Oracle Commits | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238524@lists.php.net to get a copy of this message | ||
Jay Blanchard wrote:
> Good afternoon and salutations denizens of the greatest list generated
> by electrons!
>
> I have a situation where I am trying to commit a transaction in Oracle
> with PHP as follows;
>
> $udGeocode = oci_parse($conn, "UPDATE CONT_ADDRESS SET GEOCODE =
> '".$geocode[0]."' WHERE CONTRACT_ID = '".$row[0]."' AND
> POSTAL_CODE =
> '".$ROW[1]."' AND ADDRESS_TYPE = 'S'");
> oci_execute($udGeocode, OCI_DEFAULT);
did the execute actually succeed? does the data get into the DB if you
use OCI_COMMIT_ON_SUCCESS instead of OCI_DEFAULT?
I don't support using oci_internal_debug() gives you any extra info?
>
> // commit
> $committed = oci_commit($conn);
> if (!$committed) {
> $error = oci_error($conn);
> echo 'Commit failed. Oracle reports: ' . $error['message'];
> } else {
> echo ' Commit succeeded';
> }
>
> The commit returns as successful, but it is not successful in the
> database itself. Am I missing something here? I have RTFM on oci_execute
> and oci_commit and cannot find anything.....
>
> Thanks!
>