By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,776 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,776 IT Pros & Developers. It's quick & easy.

Store Multiple Images in Mysql

P: 250
I'm using mysql and php. In my application I want to store multiple images in a database.
ex: I want to store a vehicle details. vehicle id, type,make and vehicle images. there can be 1 or more images for 1 vehicle. Should I need to create column for vehicle table or should I create separate table for images. Please help me..
Jul 14 '11 #1
Share this Question
Share on Google+
3 Replies

code green
Expert 100+
P: 1,726
Unlees you really need to, images are better stored directly on the server.
Then in your table have an extra column that stores the filename.
The database can quickly grow storing blob data.
Jul 14 '11 #2

P: 250
How can I store more images in one column.
This is my table
Expand|Select|Wrap|Line Numbers
  1. vehicleId  vehicleMake     vehicleModel  imagePath
Jul 14 '11 #3

Expert 100+
P: 801
You should create a separate table to store images/images path containing the following 2 fields (you can add more fields if required e.g. image type) e.g.
Jul 17 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.