Tentei destas 2 formas no windows 10 inserir fotos no BD Mysql, o campo foto retorna null após as 2 formas abaixo, poderiam ver onde estou errando?
INSERT INTO producto
(Nombres, Foto, Descripcion, Precio, Stock )
VALUES
("diamante negro lacta", LOAD_FILE('C:\\chocolates\\diamante.jpg'), "100g" ,5.30, 50),
("prestigio nestle", LOAD_FILE('C:\\chocolates\\prestigio.jpg'),"100g" , 7.30, 50),
("galak nestle", LOAD_FILE('C:\\chocolates\\galak.jpg'), "100g" , 3.65, 70),
("bala soft", LOAD_FILE('C:\\chocolates\\balasoft.jpg'), "600g", 12.7, 120),
("garoto nestle", LOAD_FILE('C:\\chocolates\\garoto.jpg'), "100g", 8.30, 65),
("snickers chocolate", LOAD_FILE('C:\\chocolates\\snickers.jpg'), "80g", 3.6, 120);
ou
INSERT INTO producto
(Nombres, Foto, Descripcion, Precio, Stock )
VALUES
("diamante negro lacta", LOAD_FILE('C:\chocolates\diamante.jpg'), "100g" ,5.30, 50),
("prestigio nestle", LOAD_FILE('C:\chocolates\prestigio.jpg'),"100g" , 7.30, 50),
("galak nestle", LOAD_FILE('C:\chocolates\galak.jpg'), "100g" , 3.65, 70),
("bala soft", LOAD_FILE('C:\chocolates\balasoft.jpg'), "600g", 12.7, 120),
("garoto nestle", LOAD_FILE('C:\chocolates\garoto.jpg'), "100g", 8.30, 65),
("snickers chocolate", LOAD_FILE('C:\chocolates\snickers.jpg'), "80g", 3.6, 120);
tabela
CREATE TABLE producto
(
idProducto
int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
Nombres
varchar(255) DEFAULT NULL,
Foto
longblob,
Descripcion
varchar(255) DEFAULT NULL,
Precio
double DEFAULT NULL,
Stock
int(11) UNSIGNED DEFAULT NULL,
PRIMARY KEY (idProducto)
) ;