shan_cool Posted March 27, 2006 Share Posted March 27, 2006 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... Quote Link to comment Share on other sites More sharing options...
wickning1 Posted March 27, 2006 Share Posted March 27, 2006 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. 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.