Jump to content


Photo

Maintaining Images


  • Please log in to reply
1 reply to this topic

#1 shan_cool

shan_cool
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts
  • LocationChennai,India

Posted 27 March 2006 - 05:08 AM

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...

#2 wickning1

wickning1
  • Members
  • PipPipPip
  • Advanced Member
  • 405 posts

Posted 27 March 2006 - 08:09 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users