OCI lob upd. problem

From: Date: Sun, 10 Sep 2000 17:49:44 +0000
Subject: OCI lob upd. problem
Groups: php.db 
Request: Send a blank email to php-db+get-2783@lists.php.net to get a copy of this message
Hi everyone, I have a strange problem with oci lob update. I've got the following code: $ttext=$ttext.chr(0); $dlobupd=ocinewdescriptor($conn,OCI_D_LOB); $qstring="update tl set STATUS='$status',FINISH='$finish',STARTED='$started',LAST_USER='$REMOTE_USER' where ID='$param1' returning COMMENT2 into :COMMENT2"; $stmt = OCIParse($conn,$qstring); ocibindbyname($stmt,"COMMENT2",&$dlobupd,-1,OCI_B_CLOB); OCIExecute($stmt,OCI_DEFAULT); $dlobupd->save($ttext); ocicommit($conn); $ttext is the name of a HTML TEXTAREA. After update my lob (COMMENT2) contains the previously deleted text too. Anything I do to it _always_ adds the previous string to the new variable. For example: $ttext is "5678" I delete the numbers, and overwrite the textarea with "1234" The code above runs. I select the lob from the table and it contains:"12345678" This is why I tried to concatenate a chr(0) with the string, but it did not help. Has anyone ever seen a thing like that. Any help would be appreciated. Thanks Máté Lajtos

« previous php.db (#2783) next »