Jump to content

Images in MySQL


craiggerz

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.