I have a rating table, I need to get the average rating for certain record. However , when I use AR method, it did not return the average which is what I need. All it returns are those attributes defined in the model file.
How can I get the average of certain fields? thanks
I did read that part, however that is only for count . temporarily I used PDO to solve it. However, to keep code persistent, I still what to find out how. Could anybody give me an example? Thanks