Why wouldn't a perfect SQL statement execute on oci_excute?

I've some PHP code writing to an Oracle database via OCI8 library. I have a insert statement which wouldn't execute programmatically- if I print out the statement and run it via SquirrelSQL it would insert the data successfully. I have delete and select statement elsewhere in the code which work perfectly. What can be the issue? And as I said if I print $om_query and run manually it inserts successfully. I'm not getting any other errors.

$om_query = "INSERT INTO DB.TABLE(R1,R2) VALUES(V1,V2)";
$s2 = oci_parse($conn, $om_query);
$qs = oci_execute($s2);
oci_commit ($conn); 

if(!$qs){
    $ma = oci_error();
    $failedqueries .= '<br /><br />MAINQ: ' . $om_query . '<br /><b>OCI_ERROR_MSG: </b>' . $ma['message'];
}

oci_error() doesn't append anything useful.

Answers


Check that you don't have an open transaction on the affected table. PL may be attempting to delete the inserted record.

In Oracle, you must perform a COMMIT or ROLLBACK operation after modifying data (whether through an insert, update or delete).


Need Your Help

WordPress media-upload how to send data to custom table

php jquery wordpress

I'm building a little plugin in WordPress, and currently using WordPress media-upload.php to upload images.

Image getting cut off in IE

html css

Please checkout my website in Internet Explorer: