I made star voting script and i was wondering how to display average result?

Recommended Answers

All 2 Replies

I made star voting script and i was wondering how to display average result?

The matter is not clear with just this, until the code is seen.
at least your queries first

Yes, we have no clue what your system looks like. I would assume you have a ratings table where you get the id of the "item" you are rating. So if thats true somethings like this

SELECT *, AVG(rating_field) as avgrating FROM `your_table`
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.