I have a script with the following code to insert data into an Oracle table:
$sql = "INSERT INTO EXAMPLE_TABLE (ID, FIELD, VAL) VALUES (:id, :test, :ok)";
$stid = oci_parse($conn, $sql);
//die("parsed ok");
oci_bind_by_name($stid, ":id", $id);
oci_bind_by_name($stid, ":test", $test);
oci_bind_by_name($stid, ":ok", $ok);
//die("params bound");
$result =@oci_execute($stid);
if(!$result)
{
$err = oci_error($stid);
$error = $err['message'];
echo $error; die('end error');
}
echo oci_num_rows($stid) . " rows inserted.<br />";
die("inserted");
The script was working fine, and then it just stopped. I threw in some die statements to find where the script is stalling. The last place I can get to is "die("params bound")".
I've verified that the variables are ok and that the database connection is valid. I also manually connected to the database using sqldeveloper and had no problem.
Why is this script suddenly stalling?