que tipo de campo tendria que ser char,int etc...
tendría que crear una carpeta con todas las imágenes
y poner el path absoluto de las base de datos?
CREATE TABLE IF NOT EXISTS foto (
id_foto SMALLINT(4) UNSIGNED ZEROFILL NOT NULL,
nombre_foto VARCHAR(50) UNIQUE NOT NULL,
foto MEDIUMBLOB NOT NULL,
categoria_foto VARCHAR(50) NOT NULL,
formato_foto VARCHAR(50) NOT NULL,
foto_id_producto SMALLINT (3) UNSIGNED ZEROFILL NOT NULL,
CONSTRAINT pk_id_foto PRIMARY KEY (id_foto),
CONSTRAINT fk_foto_id_producto FOREIGN KEY (foto_id_producto) REFERENCES producte(id_producto)
)ENGINE=InnoDB;
id_foto nombre_foto foto categoria_foto formato_foto foto_id_producte
0000 foto.jpeg [BLOB - 7.2 KB] r eposteria image/jpeg 000