ninedoors Posted December 10, 2007 Share Posted December 10, 2007 Is there a way to have a database column that is the product of a function (say addition) of two or more other columns? If so how do you go about doing that. I run a hockey league and I do player stats for the league. I want to know if the points column in my database can just be my goals column and assists column added together, so that any time any players goals or assists are altered the points column is updated as well. I want to use this process for points per game and other stats as well. Nick Quote Link to comment Share on other sites More sharing options...
revraz Posted December 10, 2007 Share Posted December 10, 2007 Sure, you can do it either in sql or in PHP. Quote Link to comment Share on other sites More sharing options...
ninedoors Posted December 10, 2007 Author Share Posted December 10, 2007 Great! How do I go about doing this. I am using phpMyAdmin to monitor my databases right now Quote Link to comment Share on other sites More sharing options...
revraz Posted December 10, 2007 Share Posted December 10, 2007 Try this out http://www.tizag.com/mysqlTutorial/mysqlsum.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.