Connecting Tech Pros Worldwide Help | Site Map

star rating system

pradeepjain's Avatar
Needs Regular Fix
 
Join Date: Jul 2007
Location: India
Posts: 405
#1: Oct 8 '09
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

http://www.masugadesign.com/the-lab/...ar-rating-bar/
dlite922's Avatar
Expert
 
Join Date: Dec 2007
Location: Moon, Dark Side
Posts: 1,094
#2: Oct 8 '09

re: star rating system


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.

Peace,



Dan
Reply