By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,715 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,715 IT Pros & Developers. It's quick & easy.

star rating system

P: 563
Hii guys ,
I have several products in my mysql database and i wanna allow the authorized users to rate the products !! i am clear till this point like it has to be done with the combination of ajax,php,mysql . I have a requirement for which i dono how to go about i.e the user once rated a product must be allowed to change his rating also!!! i was only thinking of average and rating feature!!!any help on changing the rating !!

this is the rating system i am using
Oct 8 '09 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,584
I can't see your link but nevertheless, how I would do it is store the user_id, the product and their rating in a table.

Yes, it's true that if every user gave a rating to every product your table will be (Total User x Total Products) huge compared to just (1 x Total Products).

Protip: use REPLACE INTO for this table as a query. If there's no rating with this user/product it will create it, if there is it will update it.


Oct 8 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.