Kingy Posted February 7, 2008 Share Posted February 7, 2008 i have a unique hits counter and i have a question about how to count all hits... my table is: unique_hits ( id ip expire_time hits) so say i have 1 | 111.111.111.111 | timehere | 17 2 | 222.222.222.222 | timehere | 3 3 | 123.321.123.321 | timehere | 10 what is the query and php to count total number of hits (30 in total) Quote Link to comment https://forums.phpfreaks.com/topic/89879-counting/ Share on other sites More sharing options...
priti Posted February 7, 2008 Share Posted February 7, 2008 To get the total sum amount you can use SUM function in mysql query select SUM(hits) from unique_hits Quote Link to comment https://forums.phpfreaks.com/topic/89879-counting/#findComment-460620 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.