Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing Images in MySQL

Status
Not open for further replies.
Jan 19, 2003
34
US
I need to be able to store an image file (.jpg) with each of my product records in my database. What is the best way to go about this? Any help appreciated.
 
My 'inventory' table has a column for 'thumbnail' and another for the full size image. The data for the graphics columns is the path to the image.

product_id thumbnail
2101 /grfx/bookcover/2101.jpg

SELECT product_id, thumbnail FROM inventory

The beginning of your directory path may differ according to what your shopping cart script requires.

Ashford
 
Hi StarGazeR82,

if you need to store it directly in a column you should use the 'blob' datatype.

Bye


Qatqat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top