Voting

: four plus three?
(Example: nine)

The Note You're Voting On

jcd at iddg dot com
25 years ago
[Editor's note: don't use '&' for parameters in bind calls in PHP 5]

The code up above is somewhat correct... here's an example of how I got a CLOB to work

<?php
function insert_adinfo($AdInfoID, $MagazineType, $Publish, $DatePost, $BodyText)
{
global
$db;

// Insert record into database
$clob = OCINewDescriptor($db, OCI_D_LOB);
$stmt = OCIParse($db,"insert into tblAdInfo values ($AdInfoID, $MagazineType, '$Publish', to_date('$DatePost', 'YYYY-MM-DD'), EMPTY_CLOB()) returning BodyText into :the_blob");
OCIBindByName($stmt, ':the_blob', &$clob, -1, OCI_B_CLOB);
OCIExecute($stmt, OCI_DEFAULT);
if(
$clob->save($BodyText)){
OCICommit($db);
}else{
echo
"Problems: Couldn't upload Clob\n";
}

OCIFreeDescriptor($clob);
OCIFreeStatement($stmt);
}
?>

<< Back to user notes page

To Top