close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

storing images - blob?

Thread began 12/28/2010 8:07 pm by davidp420108 | Last modified 12/29/2010 12:11 pm by Ray Borduin | 864 views | 4 replies |

davidp420108

storing images - blob?

in the sql database, should the image data type be saved as a blob? or use varchar()?

I am curious if the photo is stored in the database or on the server and the database stores only the link to the photo.

thanks

Sign in to reply to this post

Ray BorduinWebAssist

Databases lose efficiency when using blobs and it is not commonly recommended unless truly necessary. The commonly accepted way to store image or file data is storing the image in a particular location and saving the file name as a reference in a varchar field in the database. This technique will create a more efficient database that is more scalable, and cuts down on the code necessary.

Sign in to reply to this post

davidp420108

Again, thanks for the explanation.

Sign in to reply to this post

davidp420108

One more question:

Would you create a separate table for your images and connect it to the inventory table. Or would you have it all in one table.

I am allowing 10 images with a thumb of each for each item in inventory.

thanks

Sign in to reply to this post

Ray BorduinWebAssist

I would create a separate table if I wanted to allow a variable number of images for each inventory. If you are sure you want a max of 10 then it might be easier to do it all in one table.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...