I am trying to throw implement some error handling using Oracle and PHP. If I try to insert the statement into the DB table where the PK already exists, there is no INSERT performed - yet it returns that the data was added - when really it isnt - Need some help with the Error HAndling
require('connection.inc');
require('connection_db.inc');
$conn = db_connect();
$sql = oci_parse($conn,"INSERT INTO Schema.TableA (DOE, Trips) VALUES (:doe, :trp)");
oci_bind_by_name($sql, ':doe', $f1);
oci_bind_by_name($sql, ':trp', $f2);
oci_execute($sql);
<?
if($sql)
{
echo("Input data has been added<br><br>");
echo("<a href='link1.php'>View Links</a>");
}
else
{
echo("Input data has failed");
echo "</div>";
}
?>