uploading an image (BLOB) to mysql |
(03-19-2021, 11:26 AM)InsiteFX Wrote: MySQL BLOB using PHPThanks. I am now able to convert the .png into a string. But when i try to insert it into the table I am getting: ERROR - 2021-03-20 09:42:07 --> Query error: Invalid utf8 character string: '\x89PNG' - Invalid query: INSERT INTO word.image_BLOB VALUES(�PNG The actual code is: $sql = "INSERT INTO $_SESSION[table].image_BLOB VALUES($imgData)"; $iRc=$this->db->query($sql); I also tried $sql = "INSERT INTO $_SESSION[table].image_BLOB VALUES({$imgData})"; But with the same result. Any ideas of what to do? It seems to insert but I really can't tell if it is getting placed correctly into the table since I am a neophyte with sqlWorkbench.
proof that an old dog can learn new tricks
|
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 InsiteFX - 03-19-2021, 11:26 AM
RE: uploading an image (BLOB) to mysql - by richb201 - 03-20-2021, 12:18 AM
RE: uploading an image (BLOB) to mysql - by InsiteFX - 03-20-2021, 11:34 AM
RE: uploading an image (BLOB) to mysql - by richb201 - 03-20-2021, 11:53 AM
RE: uploading an image (BLOB) to mysql - by InsiteFX - 03-20-2021, 01:51 PM
RE: uploading an image (BLOB) to mysql - by richb201 - 03-20-2021, 03:42 PM
RE: uploading an image (BLOB) to mysql - by richb201 - 03-21-2021, 12:03 AM
RE: uploading an image (BLOB) to mysql - by richb201 - 03-24-2021, 03:32 PM
RE: uploading an image (BLOB) to mysql - by richb201 - 03-25-2021, 05:54 AM
|