Mysql – Storing pictures in a database on phpMyAdmin

apache-2.2MySQL

everyone. I am trying to create a database on PHPMyAdmin in Apache, where the picture would be in a separate field. I know the MIME type would be either image/jpeg or image/png but I don't know what to set the Type as and I don't know how to insert pictures into any of the tables in the database. Could somebody please help with this problem? Any help would be much appreciated.

Best Answer

You CAN store pictures in a database, but I highly recommend against it. I run a big image versioning/indexing system driven off a database, and the maintenance overhead is appalling. You'll be doing a lot of integrity checking.

If you don't need to track version changes, I'd highly recommend putting the images in the filesystem, and only storing location information in the database.