star rating system

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeepjain
    Contributor
    • Jul 2007
    • 563

    star rating system

    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

  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    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

    Comment

    Working...