CodeIgniter Forums
Insert BLOB into oracle db - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Insert BLOB into oracle db (/showthread.php?tid=65787)



Insert BLOB into oracle db - francismtntc - 07-24-2016

Well I've already searched for this issue but it seems it is still not answered.
I have the same issue as this one. http://stackoverflow.com/questions/20016952/error-inserting-image-in-oracle-blob-with-codeigniter

Model(){

    function insertData($fileData){ 
   // array structure
   $db_row = array(
      "id" => $id,
      "blob1" => file_get_contents($fileData['full_path']),
      "blob2" => file_get_contents($fileData['full_path']),
      "blob3" => file_get_contents($fileData['full_path'])
   )

   return $this->db->insert("table", $db_row);
   }

   /* I showed file_get_contents($fileData['full_path']), though those values were actually passed down to the function through $filesData
    * The data is right when I use print_r
    * I do actually upload 3 or more blobs in one row
    * 
    */ 
}