Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Average query
  • Hi How can I write a query with the avg sql function ? here is my query : (average on scores.score)
    DB::select('scores.game_id','games.titre')->from('scores')->where('scores.user_id','=',$user_id);
  • Found it : $expression = DB::expr('AVG(scores.score)');
    DB::select(array($expression,'average'),'scores.game_id','games.titre') ...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion