SQLite Forum

How to READ and WRITE an image to an SQLITE BLOB FIELD
Login
Hi Tim,

Thank you for the reply..

Here is all I have right now, I planned on passing the ROW ID and Field name 
via a URL as shown.

<?php

// URL Format:
// http://www.localhost/sqlite/ccc_update_image.php?iduser=1&idimage=image1

   $userid = $_GET['iduser'];
   $imageid = $_GET['idimage'];

   class MyDB extends SQLite3 {
      function __construct() {
         $this->open('ccc_contents.db');
      }
   }
   
   $db = new MyDB();
   if(!$db){
      echo $db->lastErrorMsg();
   } else {
      echo "Opened database successfully\n";
   }

///////////////////////////////////////////////////////////////////////////////


// Need PHP code to READ and WRITE to external image file and SAVE to SQLITE


///////////////////////////////////////////////////////////////////////////////

   $ret = $db->exec($sql);
   if(!$ret) {
      echo $db->lastErrorMsg();
   } else {
      echo "Records created successfully\n";
   }
   $db->close();
?>