Click here to Skip to main content
13,591,461 members
Rate this:
Please Sign up or sign in to vote.
I'm making a website for store ... in the admin area he inter the product title and description and an image for the product and in the user area in the menu if he choose the name of the product he show all what is the admin inserted .

but what should i do , save the image in the databse or just in the server ?
and if i stored it in the serve how can i link it with the description ?
Posted 16-Dec-12 19:58pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Depending on the number of products you have and the size of the disk space available on the server (both web and database server) you need to take this call.
To store and retrieve the images from database, you can go through the following link:[^]

If you want to store the image in the web server filesystem, generate a unique name for this file and store the path of this file in the product table along with the product details
For example: If you have a table named Products with the following schema:
Product Id (can be identity or GUID)
Name varchar(255)
ImagePath varchar(255)

When displaying the product details, give this path as the source to the image element.
Hope I am clear.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.180618.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100