I'm working on a project that deals with text files that are to be stored in a database.
So i'm using the blob
data type, that converts the files into binary and then uploads to MySQL.
My problem is how to convert the entire binary text into char while retrieving it? I tried the php command below but it doesn't seem to work well. Please help.
SELECT cast(blob-col_name as char(1000000)) from `table_name`
The output retrieves garbage text as shown in the image below.