
public function getAveRating($restoid) { $where = array( "restoid" => $restoid ); $this->db->where($where); $this->db->select_avg('rate'); $query = $this->db->get('ratings')->first_row('array'); return $query['rate']; } How do I limit the average into 2 decimal places in getting the rating?