Hello sir,
I am trying to inset a small image img.png (57.7KB) into mysql database. Table structure is id(int) and image(blob). I directly inserting image can cause problems but I need this for test purpose. I am using windws 10 os and WampServer 3.1.7 64 bit. (mysql 5.7.24) and My image is located at local disk drive F.
I can insert the image using localhost/phpmyadmin but
when I try command-line using the following command:
insert into image(id,image) values (2,load_file('f:\img.png'));
or
insert into image(id,image) values (2,load_file('f:\\img.png'));
error occurs :-
ERROR 1048 (23000): Column ‘image’ cannot be null
Please help.
I am trying to inset a small image img.png (57.7KB) into mysql database. Table structure is id(int) and image(blob). I directly inserting image can cause problems but I need this for test purpose. I am using windws 10 os and WampServer 3.1.7 64 bit. (mysql 5.7.24) and My image is located at local disk drive F.
I can insert the image using localhost/phpmyadmin but
when I try command-line using the following command:
insert into image(id,image) values (2,load_file('f:\img.png'));
or
insert into image(id,image) values (2,load_file('f:\\img.png'));
error occurs :-
ERROR 1048 (23000): Column ‘image’ cannot be null
Please help.