I have a problem to get result from mysql.
I want this average result when i have for example two reviews:
food: 5.0
prices: 5.0
lodging: 6.2
but i got this results separatly instead:
food: 8.0
prices: 6.0
lodging: 3.0
food: 2.0
prices: 4.0
lodging: 10.0
and i cant figure how to solve it, because i am still beginner in php/mysql
here is the code:
`$db->query("SELECT ROUND( AVG(grade),1 ) as `grade` FROM grades WHERE id = '$grade_id'");`
thx.