CLOB update difficulties
| From: | Chris Murtland | Date: | Sat, 24 Feb 2001 21:42:59 +0000 |
| Subject: | CLOB update difficulties | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-41514@lists.php.net to get a copy of this message | ||
Hello,
I am trying to update an Oracle 8i CLOB field. I have looked at previous
messages on the list and am trying the following:
$sql="update murtland.articles set
title='$title',release_date=TO_DATE('$release_date','YYYY-MM-DD'),body=:body
text,sections='$sections',mod_date=TO_DATE('$mod_date','yyyy-mm-dd
hh24:mi:ss'),mod_userid=$userid where articleid=$articleid";
//echo $sql;
$stmt=OCIParse($conn,$sql);
$bodytext = OCINewDescriptor($conn, OCI_D_LOB);
OCIBindByName($stmt,":bodytext",&$bodytext,-1,OCI_B_CLOB);
OCIExecute($stmt, OCI_DEFAULT);
$bodytext->save($body);
OCICommit($stmt);
$bodytext->free();
OCIFreeStatement($stmt);
OCILogoff($conn);
However, this gives me the error: invalid LOB locator specified.
Any suggestions would be greatly appreciated.
Thanks,
Chris
~~~~~~~~~~~~~~~~~~~~
Chris Murtland
Studio Moxie, LLC
www.studiomoxie.com
336.773.1684
800.707.2367 fax/voicemail