INSERT INTO items (id,name,image,price) VALUES('1','iphone 5s',LOAD_FILE('C:\xampp\htdocs\project\1.jpg'),300);
this statement cause error
INSERT INTO items (id,name,image,price) VALUES('1','iphone 5s',LOAD_FILE('C:\xampp\htdocs\project\1.jpg'),300)
MySQL said: Documentation
here is the error
#1048 - Column 'image' cannot be null
You must escape backslashes in any string:
Or, since MySQL will 'correctly' interpret forward-slashes, even on Windows:
(I assume
image
is declaredBLOB
orMEDIUMBLOB
?)