eugene2009 Posted February 15, 2010 Share Posted February 15, 2010 Hello, i have a script that records pageviews.. everything works great it does an insert if not exists, and it updates +1 if it does.. thats not the problem though.. for example.. row1 - 6 row2 - 5 row3 - 8 row4 - 2 row5 - 9 What code can I use that will automatically give me the sum of all the rows (6+5+8+2+9, etc.) because those numbers will always be updated and I want a total that will be updated please help Link to comment https://forums.phpfreaks.com/topic/192092-mysql-count-calculation/ Share on other sites More sharing options...
eugene2009 Posted February 15, 2010 Author Share Posted February 15, 2010 ? Link to comment https://forums.phpfreaks.com/topic/192092-mysql-count-calculation/#findComment-1012396 Share on other sites More sharing options...
teamatomic Posted February 15, 2010 Share Posted February 15, 2010 SELECT SUM(visits) FROM count GROUP BY visits"; or something like this HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/192092-mysql-count-calculation/#findComment-1012404 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.