Jump to content

Add products along with logged in user id


hance2105

Recommended Posts

hello,

i have a website with 2 roles - retailer and customer. the retailer adds, deletes, updates records. different retailers can add the same product. is it possible to add the records by retailer? i mean if the same product is added, it should be linked to the retailer that added it so that i can later query and retrieve records by retailer. i have a retailer table in my database.

any tutorials that i can go through?

any ideas how to do that?

 
 

I'd create another table called products which holds all the information about the product, and when the retailer adds/updates/deletes products, you insert/update, you can either send the retailer name into the products table, or create a unique string which links to both tables.

 

Each retailer could have a unique id. When they update a product, you send that unique string along with the product information into the products table. This will allow retailers to uplaod the same products and also help when retrieving the information.

 

Kind regards,

 

L2c.

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.