Trying to decide on the best way to store some uploaded images.
They will be images of a car, and each car will have at most 5 images.
1) Store the images with names such as 1_1.jpg, 1_2.jpg ... and then when I come to display the images scan through the folder to find images of this name and store them in a array.
2) create a new folder for this car and store the images in their with the names 1.jpg, 2.jpg . . then recurse through these and load into array to display.
2) Store refrences to each image in the db along with the other info for the car. However if i only had 3 images this means their would be 2 null refrences in the db.
What do you reckon is the most efficient?