note 81259 deleted from ref.oci8 by felipe
| From: | felipe@php.net | Date: | Fri, 22 Feb 2008 02:37:04 +0000 |
| Subject: | note 81259 deleted from ref.oci8 by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-136388@lists.php.net to get a copy of this message | ||
Note Submitter: Alex Monte
Reason: 4
----
Salvando um CLOB.
$CLOB_texto = OCINewDescriptor($conexao, OCI_D_LOB);
$CLOB_insert = "INSERT INTO table_clob
(name, C_texto) VALUES (:name ,EMPTY_CLOB()) RETURNING C_texto INTO :C_texto";
$stmt = OCIParser($conexao, $CLOB_insert);
OCIBindByName ($stmt, ":C_texto", $CLOB_texto, -1, OCI_B_CLOB);
OCIBindByName ($stmt, ":name", $name, 80);
if (OCIExecute($stmt, OCI_COMMIT_ON_SUCCESS))
{
$CLOB_texto->save($texto_descricao);
OCICommit($conexao);
$CLOB_texto->free();
}
Atualizando um CLOB
$CLOB_texto = OCINewDescriptor($conexao, OCI_D_LOB);
$CLOB_update = "UPDATE BD_SICA.FC_PLANO_ENSINO SET C_texto = EMPTY_CLOB(),
name = :name
WHERE id = :id
RETURNING C_texto INTO :C_texto";
$stmt = OCIParser($conexao, $CLOB_update);
OCIBindByName ($stmt, ":C_texto", $CLOB_texto, -1, OCI_B_CLOB);
OCIBindByName ($stmt, ":name", $name, 80);
OCIBindByName ($stmt, ":id", $id, 10);
if (OCIExecute($stmt, OCI_COMMIT_ON_SUCCESS))
{
$CLOB_texto->save($texto_descricao);
OCICommit($conexao);
$CLOB_texto->free();
}