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! Quote Link to comment 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). Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.