Jump to content

Shambles

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Shambles's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I try to insert an image into a sqlite2 table, but every time i get this error message: Here is the code: $fileContent=file_get_contents($_FILES['image']['tmp_name'],FILE_TEXT); $fileContent=sqlite_escape_string($fileContent); $dbhandle = sqlite_open('image.sqlite'); $query = sqlite_exec($dbhandle, 'INSERT INTO image VALUES ("'.$_FILES['image']['type'].'","'.$fileContent.'")', $error); if (!$query) { exit("Error in query: '$error'"); } else { echo 'Number of rows modified: ', sqlite_changes($dbhandle); } My interim solution at the moment is that I convert each char to ASCII, but that takes about 3-times more space in the db.
×
×
  • 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.