Forum Stats

  • 3,827,674 Users
  • 2,260,803 Discussions
  • 7,897,332 Comments

Discussions

PHP using PDO driver cant insert long CLOB data in oracle What is the correct way?

ddf75cc0-fca8-4149-9696-8a84886851d3
edited Jun 24, 2016 1:40PM in PHP
$idusr=1;
$datafilters = '... Esto es un string JSON muy largo mayor de 4k....';
$stm = $db->prepare("Insert into " . $this->table . " (idusr, datafilters) Values (:idusr,EMPTY_CLOB()) RETURNING datafilters INTO :datafilters");
$isformsended = $data->formsended?1:0; 
$stm->bindParam(':idusr', $idusr); 
$stm->bindParam(':datafilters', $datafilters, PDO::PARAM_LOB);  
if (!$stm) { echo "\n 1 PDO::errorInfo():\n"; print_r($db->errorInfo()); }  
$db->beginTransaction();  
$stm->execute();  
$db->commit();  
<span class="pln" style="color: #2e3133;">echo </span><span class="str" style="color: #6b291b;">"\n ERROR :\n"</span><span class="pun" style="color: #2e3133;">;</span><span class="pln" style="color: #2e3133;"> print_r</span><span class="pun" style="color: #2e3133;">(</span><span class="pln" style="color: #2e3133;">$db</span><span class="pun" style="color: #2e3133;">-></span><span class="pln" style="color: #2e3133;">errorInfo</span><span class="pun" style="color: #2e3133;">());</span>


This is my code and still do not work, could it be because Im using windows, Don't know what I am doing bad.

Im using PHP in WINDOWS usin XAMPP and DB is ORACLE.

Please help, thanks in advance.

Answers

This discussion has been closed.