Jump to content

Recommended Posts

Hi,

 

Should I store images within a MySQL Database. Or should I include 4-6 fields for image names like pic001.jpg, etc.? Or should I name all my images Product-Name-001.jpg, Product-Name-002.jpg, etc.. and then use the "Product Name" field, add the hypen using php coding and then have the remaining "-001.jpg", "-002.jpg", etc.. within the template php file??

 

I think the best is the quickest to load but I do not know which way is quickest. What do you recommend?

 

Matt.

I have always been told to NOT store images in mysql. I don't know why. I think it has something to do with scaling and if things are not right they could get truncated. I store images in a folder and put their name into the database. Maybe someone that knows could explain why for the both of us.

I once made the mistake of saving images in the database when starting off. All was fine and dandy until one day we changed servers and I could no longer get images to show properly. Something with the charsets I guess messed it up.

 

Anyways, I've found that loading from the filesystem instead of pulling from the database will be quicker once you start getting more and more rows into your database. The scalability just isn't there for throwing large blobs of data intoyour DB.

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.