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.