Welcome Guest, Not a member yet? Register   Sign In
uploading an image (BLOB) to mysql
#9

(This post was last modified: 03-24-2021, 03:35 PM by richb201.)

I updated the default collation and default char set but still have the issue. I think the problem is with the SQL 'update'. This is what I am using


        $BLOB_insert = array(
            "id" => $primary_key,
            "img_BLOB" => $data
        );

$this->db->update('word', $BLOB_insert);

I see this error in the log:
ERROR - 2021-03-24 18:13:03 --> Query error: Duplicate entry '47' for key 'word.PRIMARY' - Invalid query: UPDATE `word` SET `id` = 47, `img_BLOB` =

But I am trying to update id=47! It is true that the data in the blob is showing lots of '?' chars, but now I am thinking that is not the problem, the problem is the update command.
proof that an old dog can learn new tricks
Reply


Messages In This Thread
uploading an image (BLOB) to mysql - by richb201 - 03-19-2021, 09:04 AM
RE: uploading an image (BLOB) to mysql - by richb201 - 03-24-2021, 03:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB