I want to insert the data in clob and varchar2 column in a single insert statement in oracle.
$conn=oci_connect();
if (!$conn)
{
$e = oci_error(); // For oci_connect errors pass no handle
echo "if not connection<br>";
echo htmlentities($e['message']);
}
else
{
//Where email and type column has varchar2 datatype and elements column has CLOB datatype
$isql="INSERT INTO TEST_DEV
VALUES(':email',':type',':elements')";
$stmt = oci_parse($conn,$isql);
oci_bind_by_name($stmt, ":email", 'test@test.com');
oci_bind_by_name($stmt, ":type", 'test_records');
oci_bind_by_name($stmt, ":elements", 'asdadasdsa|asdsa',-1,OCI_B_BLOB);
$rc=oci_execute($stmt);
if(!$rc)
{
$e=oci_error($stmt);
var_dump($e);
}
oci_commit($conn);
}
oci_free_statement($stmt);
oci_close($conn);
This code is giving the error. How to solve ??
Thanks,
Faisal Nasir