hance2105 Posted June 19, 2013 Share Posted June 19, 2013 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? Quote Link to comment https://forums.phpfreaks.com/topic/279341-add-products-along-with-logged-in-user-id/ Share on other sites More sharing options...
Solution Love2c0de Posted June 19, 2013 Solution Share Posted June 19, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/279341-add-products-along-with-logged-in-user-id/#findComment-1436798 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.