MySQL
CREATE TABLE document_control (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
person VARCHAR(40),
dateSent TIMESTAMP,
fileAttachment MEDIUMBLOB
);
MySQL Insert record query
INSERT INTO DOCUMENT_CONTROL (fileattachment) values (load_file('C:\Users\<user>\Desktop\test.docx'));
Retrieving record
If I run this query here: SELECT * FROM document_control
- Everything is null - even after the insert query above.
Question
Why is the values null
? and also.. how can I properly store a .docx
file into MySQL and open the file?