PDA

View Full Version : Inserting image into MySQL database


jrohrman
08-10-2005, 07:21 PM
ok as a precursor, I understand that this is not the best way to use images and databases, but that is how the database is designes. So that is how i have to do it.

when i try it with the syntax:
INSERT INTO image_source(id, file_name, mime_type, image_data)
VALUES (13, 's620.jpg', 'image/gif', 'C:\\Inetpub\\wwwroot\\s620.jpg')

I dont get any errors, but it doesnt insert the image either...
The image_data coulmn is of type blob as it is supposed to be, so im not sure what is going wrong here...

any help would be appreciated :)

jrohrman
08-11-2005, 01:51 AM
I was able to work this out using PHPMyAdmin. It has an interface for inserting blob data types into a database.