Hi!
Ok my problem is the following.
I use a webstite to upload some stuff into the database:
I use the following command and it works perfect:
(bin_data is a CLO😎
$result="insert into binary_data (id,title,description,filename,filesize,filetype,bin_data) values
(id.nextval, :title, :description, :filename, :filesize, :filetype EMPTY_BLOB()) returning bin_data
:bin_data2";
$iStatement=OCIParse($con, $result);
$lob = OCINewDescriptor($con, OCI_D_LO😎;
OCIBindByName($iStatement, ":bin_data", $lob, 100000, OCI_B_BLO😎;
@OCIBindByName($iStatement, ':id', &$iId, 4);
@OCIBindByName($iStatement, ':description', &$comment);
@OCIBindByName($iStatement, ':filename', &$form_data_name);
@OCIBindByName($iStatement, ':filesize', &$form_data_size);
@OCIBindByName($iStatement, ':filetype', &$form_data_type);
@OCIExecute($iStatement, OCI_DEFAULT);
$lob->save($data);
Ok...all data saved and i can get it back....so no problem...
But the problem is now, how can i update only the CLOB "bin_data" ?
I.e. there is a jpg picture stored and i would to like to exchange
only the picture....?
I read this example on the net:
$req="SELECT data FROM bdata WHERE id='5' FOR UPDATE";
$stmt=OCIParse($req);
OCIExecute($stmt, OCI_DEFAULT);
$req="UPDATE bdata SET data=:data WHERE id='5'";
$stmt=OCIParse($req);
OCIBindByName($stmt, ":data", $data, -1);
OCIExecute($stmt, OCI_DEFAULT);
OCICommit($conn);
But dosen´t worked :-(
Thanks for any idea...