$getid can be either points, rebounds, or assists (already rows in the table). I also have another row called games. What I want to add is a way to calculate PPG, RPG, APG (points/rebounds/assists per game). The formula is points/reb/ast divided by the number of games. I don't want to store it in the database. Is there any easy way to do this?PHP Code:$query = mysql_query("SELECT * FROM stats ORDER BY $getid DESC");
Would it be possible to do:
PHP Code:mysql_query("SELECT * FROM stats ORDER BY '$getid / $games' DESC");





Reply With Quote


