Welcome Guest, Not a member yet? Register   Sign In
quick question on 'math' in codeigniter
#1

[eluser]Unknown[/eluser]
I have a quick question about CodeIgniter. A couple years back, in PHP/ADOdb411, I created a system that allowed fans of a soccer team to come the site and rate the players on their performance 1-10, then display the average rating.

The way I had it structured was I had the following tables in MySQL: player, game, rating. The rating table had the rating value, but also had foreign keys for the player and the game. Then whenever the games page was displayed I'd set my query to AVG(rating_value) as average_rating for each player.

Is this possible to do in CodeIgniter? Is there a better way than I did it previously?


Messages In This Thread
quick question on 'math' in codeigniter - by El Forum - 06-24-2008, 07:11 AM
quick question on 'math' in codeigniter - by El Forum - 06-24-2008, 07:30 AM
quick question on 'math' in codeigniter - by El Forum - 06-24-2008, 07:34 AM
quick question on 'math' in codeigniter - by El Forum - 06-24-2008, 08:32 AM
quick question on 'math' in codeigniter - by El Forum - 06-24-2008, 09:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB