biochar Posted January 21, 2017 Share Posted January 21, 2017 hello all, this is probably a dumb question .. hope someone can help me understand how to do a user to user rating database where people can rate their transactions between them. so far... i have 2 tables user -id (INT) -name (VARCHAR) -review_count (INT) review -user_id (INT) -stars (INT) -text (VARCHAR) how do i distinguish who left the review for the person and vice versa since there is 1 user table. would i need to put a reviewer_id into the review table? Quote Link to comment https://forums.phpfreaks.com/topic/303001-need-help-understanding-how-to-setup-the-tables/ Share on other sites More sharing options...
Barand Posted January 21, 2017 Share Posted January 21, 2017 What is being reviewed? Quote Link to comment https://forums.phpfreaks.com/topic/303001-need-help-understanding-how-to-setup-the-tables/#findComment-1541790 Share on other sites More sharing options...
biochar Posted January 21, 2017 Author Share Posted January 21, 2017 (edited) the other person. it's for people swapping items.IEi'd review my transaction with you and vice versa Edited January 21, 2017 by biochar Quote Link to comment https://forums.phpfreaks.com/topic/303001-need-help-understanding-how-to-setup-the-tables/#findComment-1541794 Share on other sites More sharing options...
Barand Posted January 21, 2017 Share Posted January 21, 2017 So it is the transaction that is being reviewed. In which case there would be a transaction table too. Quote Link to comment https://forums.phpfreaks.com/topic/303001-need-help-understanding-how-to-setup-the-tables/#findComment-1541796 Share on other sites More sharing options...
biochar Posted January 21, 2017 Author Share Posted January 21, 2017 wouldn't the transaction go into the review table? Quote Link to comment https://forums.phpfreaks.com/topic/303001-need-help-understanding-how-to-setup-the-tables/#findComment-1541797 Share on other sites More sharing options...
biochar Posted January 21, 2017 Author Share Posted January 21, 2017 if i click on a profile to leave a feedbackit would leave a feedback into that person's user_id, amount of stars and text.. do i need to add another column for reviewer_id? thats the part that is confusing me. Quote Link to comment https://forums.phpfreaks.com/topic/303001-need-help-understanding-how-to-setup-the-tables/#findComment-1541799 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.