bert56 Posted June 1, 2014 Share Posted June 1, 2014 Is it no problem to give the SUM of integers in a column, but is it also possible to give the SUM of integers in a record (automatically)? Quote Link to comment https://forums.phpfreaks.com/topic/288908-sum-in-record/ Share on other sites More sharing options...
Barand Posted June 1, 2014 Share Posted June 1, 2014 Yes but, for the second part of your question, you need to install Intel's new telepathy chip. Quote Link to comment https://forums.phpfreaks.com/topic/288908-sum-in-record/#findComment-1481545 Share on other sites More sharing options...
bert56 Posted June 1, 2014 Author Share Posted June 1, 2014 Information, given in 1 or 0, is updated in the database. I want to know the SUM of the numbers from each user. What is the easiest way to get those scores. Quote Link to comment https://forums.phpfreaks.com/topic/288908-sum-in-record/#findComment-1481549 Share on other sites More sharing options...
Solution Barand Posted June 1, 2014 Solution Share Posted June 1, 2014 http://dev.mysql.com/doc/refman/5.6/en/group-by-functions.html#function_sum Quote Link to comment https://forums.phpfreaks.com/topic/288908-sum-in-record/#findComment-1481551 Share on other sites More sharing options...
bert56 Posted June 1, 2014 Author Share Posted June 1, 2014 Thank you very much. Is it possible that the scores directly can be post in the database? Quote Link to comment https://forums.phpfreaks.com/topic/288908-sum-in-record/#findComment-1481554 Share on other sites More sharing options...
Barand Posted June 1, 2014 Share Posted June 1, 2014 You shouldn't be storing derived values (such as totals) in the database Quote Link to comment https://forums.phpfreaks.com/topic/288908-sum-in-record/#findComment-1481555 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.