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.