Kevin Brown
Kevin Brown

Reputation: 12650

Codeigniter/PHP: Image db storage?

If I want each user in my web app to be able to upload about 6 pictures with a description, what is the best way to store that info in the db?

How would you do it?

Upvotes: 1

Views: 334

Answers (1)

dqhendricks
dqhendricks

Reputation: 19251

i would save the image files to a location in the file system. then, keep a database table for images that contains id, filepath, description. you may also want to keep other info in the image table as well, for instance, which user the image belongs to, and which is the main image, width, height, etc.

Upvotes: 5

Related Questions