Jump to content

peacemoon

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by peacemoon

  1. i suspect there is problem with PDO of PHP, because my c++ programm could read data succesfully from the file i created on my localhost. Just want to ask whether someone have encountered the same problem and found any work around.
  2. i store blob data with php like this $this->_db->exec"CREATE TABLE media (url TEXT, content BLOB)"); $fp = fopen($encoded['path'], 'rb'); $sql = "INSERT INTO media (url, content) VALUES (?, ?)"; $stmt = $this->_db->prepare($sql); $stmt->bindValue(1, $encoded['url'], PDO::PARAM_STR); $stmt->bindValue(2, $fp, PDO::PARAM_LOB); $stmt->execute(); fclose($fp); And in my c++ program (using bada framework) i read the data from blob column back. The problem is, when i use php on my localhost (version 5.3.2-1ubuntu4.2), my c++ app can recognize the blob column as blob type correctly. But when i use my remote host (php version 5.2.12) to create sqlite file, my c++ app recognizes the blob column as TEXT TYPE and my binary data is corrupted. Does anyone know why and any work around? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.