Results 1 to 4 of 4

Thread: Calculating an average

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432

    Calculating an average

    little help I have 5,5 star ratings A-E I need to calculate the average of them for display in another rating and unsure how to do this.
    A = 2 votes value = 7
    B = 1 votes value = 3
    C = 2 votes value = 7
    D = 1 votes value = 3
    E = 1 votes value = 1

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Calculating an average

    How are they stored?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432

    Re: Calculating an average

    they are stored in mysql I know how to fetch them just need to know how to calculate the equation

    A['total_votes'] (2), A['total_value'] (7)
    B ...
    C....
    D...

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Calculating an average

    Isn't it just total value divided by total votes? Or am I missing something?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width