Jump to content

Add products along with logged in user id


hance2105
Go to solution Solved by Love2c0de,

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?

 
 
Link to comment
Share on other sites

  • Solution

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.