Re: Oracle 8i questions
| From: | Joe Brown | Date: | Mon, 26 Feb 2001 16:16:45 +0000 |
| Subject: | Re: Oracle 8i questions | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6959@lists.php.net to get a copy of this message | ||
":body" in sql isn't the same as ":bodytext" in the bindbyname statement,
after that, you're in deeper than myself...
HTH,
-Joe
""Chris Murtland"" <chris@studiomoxie.com> wrote in message
news:NEBBKKJOKLFGNJAAHJAJOEJACAAA.chris@studiomoxie.com...
> I apologize for my cross-post, but since I received no response on the
> general list, I decided I must have posted in the wrong place.
>
> 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.
>
> Also, does anyone have any example code for searching Oracle 8i CLOB
fields?
> Do I
> have to create a stored procedure to be able to do this?
>
> I want to be able to search a separate varchar column in addition to
> searching the CLOB column.
>
> Thanks in advance,
> Chris
>
> ~~~~~~~~~~~~~~~~~~~~
> Chris Murtland
> Studio Moxie, LLC
> www.studiomoxie.com
> 336.773.1684
> 800.707.2367 fax/voicemail
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>