Problems using Oracle CLOB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all!
I'm having a big problem here using PHP with Oracle CLOBs.

PHP 4, Oracle 8, Apache.

Table:
ContentID - Number
Content - CLOB

My New ID is stored in the variable $NewID and the content in $NewContent <- I'm sending 5000 characters

My code is below:

$DBlink = ocilogon($DBUser,$DBPwd,$DBName);
$Clob = OCINewDescriptor($DBlink, OCI_D_LOB);
$query = "INSERT INTO TableName (ContentID, Content) VALUES ($NewID, EMPTY_CLOB()) returning Content into :THE_CLOB";
$DBresult = ociparse($DBlink, $query);
OCIBindByName($DBresult, ":THE_CLOB", &$Clob, -1, OCI_B_CLOB);
OCIExecute($DBresult, OCI_DEFAULT);
$Clob->save($NewContent);
if(OCICommit($DBlink)){
$result = true;
} else{
$result = false;
}
OCILogOff ($DBlink);


Everything works ok but the code above only insert 4000 characters or less, does anybody know how to fix it???

Thank you!!


Jadiel Flores ------------------------- http://www.abargon.com jflores@abargon.com (52-55) 52-29-80-34



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux