hi,
i have been trying to update a CLOB (ORACLE) field using php. the following is the statement i have written.
<?
include(connect.inc);
$sql = "update articlemaster SET articletitle='$articletitle', channelid=$channelid, subchannelid=$subchannelid, articlesummary='$articlesummary', userlogin='$userName', articlenoofimages=$articlenoofimages, articlenotes='$articlenotes', articledescription='$articledescription', articleispublished='$articleispublished', articleisreviewed='$articleisreviewed', articlebody = EMPTY_CLOB() where articleid=$articleid returning articlebody into :artbody";
$clob = OCINewDescriptor($conn, OCI_D_LOB);
$stmt = OCIParse($conn, $sql);
OCIBindByName($stmt, ':artbody', &$clob, -1, OCI_B_CLOB);
OCIExecute($stmt,OCI_DEFAULT);
if($clob->save($articlebody)){
OCICommit($conn);
echo "<BR><BR><b>this is cool</b>";
}else{
echo "Problems: Couldn't upload Clob\n";
}
$clob->free();
OCIFreeStatement($stmt);
?>
in the above code the include file is for connecting to the database.
the Warning i am getting is as follows.
Warning: Cannot save a lob wich size is less than 1 byte in /projects/Indianguide/public_html/admin/articles/mod.php on line 11
can anybody help me out here. please try to make it ASAP.
thanks and regards gknair.
i have been trying to update a CLOB (ORACLE) field using php. the following is the statement i have written.
<?
include(connect.inc);
$sql = "update articlemaster SET articletitle='$articletitle', channelid=$channelid, subchannelid=$subchannelid, articlesummary='$articlesummary', userlogin='$userName', articlenoofimages=$articlenoofimages, articlenotes='$articlenotes', articledescription='$articledescription', articleispublished='$articleispublished', articleisreviewed='$articleisreviewed', articlebody = EMPTY_CLOB() where articleid=$articleid returning articlebody into :artbody";
$clob = OCINewDescriptor($conn, OCI_D_LOB);
$stmt = OCIParse($conn, $sql);
OCIBindByName($stmt, ':artbody', &$clob, -1, OCI_B_CLOB);
OCIExecute($stmt,OCI_DEFAULT);
if($clob->save($articlebody)){
OCICommit($conn);
echo "<BR><BR><b>this is cool</b>";
}else{
echo "Problems: Couldn't upload Clob\n";
}
$clob->free();
OCIFreeStatement($stmt);
?>
in the above code the include file is for connecting to the database.
the Warning i am getting is as follows.
Warning: Cannot save a lob wich size is less than 1 byte in /projects/Indianguide/public_html/admin/articles/mod.php on line 11
can anybody help me out here. please try to make it ASAP.
thanks and regards gknair.