craiggerz Posted March 30, 2007 Share Posted March 30, 2007 Hi I'm looking for information on how to upload an image to a database? Can someone point me in the directions of some tutorials? Also is there a way that I can import a database into myphpadmin? I use Freeservers and I see the export function but no import, or is it just that import has been disabled? Thanks, Craig! Link to comment https://forums.phpfreaks.com/topic/44948-images-in-mysql/ Share on other sites More sharing options...
obsidian Posted March 30, 2007 Share Posted March 30, 2007 Hi I'm looking for information on how to upload an image to a database? Can someone point me in the directions of some tutorials? Don't have any tutorials right off the cuff, but this page of the MySQL manual describes how the BLOB (Binary Large Object) datatype works. You can then read your images as binary and import them into that type of field. Also is there a way that I can import a database into myphpadmin? I use Freeservers and I see the export function but no import, or is it just that import has been disabled? Typically, on export, you have a SQL file that will recreate your entire database, so all you have to do is run the file as a SQL query, and you'll have the backup (or import). Link to comment https://forums.phpfreaks.com/topic/44948-images-in-mysql/#findComment-218242 Share on other sites More sharing options...
veridicus Posted March 31, 2007 Share Posted March 31, 2007 Hi I'm looking for information on how to upload an image to a database? Can someone point me in the directions of some tutorials? Generally I recommend storing images outside of the database. Store the path to each image on disk. Link to comment https://forums.phpfreaks.com/topic/44948-images-in-mysql/#findComment-218677 Share on other sites More sharing options...
jaku78 Posted April 1, 2007 Share Posted April 1, 2007 I agree if you store it as binary, it will REALLY add to the size of the database everytime you add those images. It's a good idea store the pathname to the image in a field. Link to comment https://forums.phpfreaks.com/topic/44948-images-in-mysql/#findComment-219151 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.