Jump to content

Maintaining Images


shan_cool

Recommended Posts

Hi All,
I am in need to store and retrieve the photo's/images of employees ..
Initially i stored the entire image to the mysql database as a BLOB.... now i hav changed it in a way like... i store only the path of the image and while displaying am giving it in img src and echoing it.. it works fine...

I hav two questions here:

In my 1st method,
Will there be any pbm in storing images as BLOB? coz later i will b storing many number of images. will it affect my database?

In the 2nd method,
I need to maintain a folder containing the images of all... but thn it should be centralised in the server for all acces.now i hav done it locally(so that i hav to copy that folder to each machine).. how can i implement it? gimme some suggestions..

Rgds,
Shan...
Link to comment
Share on other sites

If you need a multi-server solution you're probably better off using your first method. There shouldn't be any problem saving binary information in a BLOB. You're limited to a query size of about a meg though, so you may have to be clever about it to save files larger than 1MB. Also note that BLOB is limited to 65kB, so you may want to use MEDIUMBLOB.

Multi-server solutions for method 2 do exist. For instance, regular synchronization via a cron job that does an FTP transfer. Also you could share a disk volume via Samba or NFS. Or you could just store images on a single server and make images from all sites pull from that URL. That might expose a domain you don't wish to expose, though.
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.