Jump to content

associating multiple images with one user


waiguru

Recommended Posts

Hi, i am building an ecommerce application for buying and selling motorbikes with codeigniter where a seller can upload more than image. The images are stored in the base root of codeigniter installation folder in a folder called images whereas the image details are stored in the database together with the user information who uploaded the image. because i want display the images together with their details and the seller details. This will really help me Can you help me? I really appreciate. Thanks.

Link to post
Share on other sites

My major issue is that i want a user to upload several images which are saved in a folder in the filesystem but when it comes to retrieve the images i cant identify various images with the user who uploaded them. I am building a site to buy and sell motorbikes where images are so crucial. Thanks

Link to post
Share on other sites

Have a table in your database that stores the user ID and the filename of the image. Each time someone uploads an image add a row to that table. When you want to display images for a particular user, query the table for the images where UserId=?

Link to post
Share on other sites
  • 4 weeks later...

AKA "foreign key" I believe. As kicken suggested, you need to store all of the references to images in a separate table, then query the table for records that match the user.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.