I'm learning mysql and am having tremendous trouble with this code to build an image database....
I know how to create a table and I know I need longblob for images. Not a problem. Currently I'm creating via: CREATE TABLE pics
(
picid int unsigned not null auto_increment primary key,
filename varchar(255) not null unique,
caption varchar(255) not null,
pic longblob not null
);
the "not null" in picid is giving me problems. Because next when I attempt to populate using this code:
INSERT INTO pics values
(
NULL,
'bear.jpg',
'a picture of a bear',
LOAD_FILE('C:/Users/USERS_NAME/Pictures/bear.jpg')
);
I get hit with the error #1048 - Column 'pic' cannot be null.
please help. I am losing my mind....