balkan7 Posted January 19, 2008 Share Posted January 19, 2008 hi i need help to count inside clicks, exaple: id down_name down_count 1 soft1 45 2 soft2 16 ---------------------------------- i wanna get result (61) so i need function for this one ! Quote Link to comment https://forums.phpfreaks.com/topic/86829-solved-count-download-clicks/ Share on other sites More sharing options...
pocobueno1388 Posted January 19, 2008 Share Posted January 19, 2008 What? You want to get the information from the row that has an "id" of 61? I don't quite understand what you want. Quote Link to comment https://forums.phpfreaks.com/topic/86829-solved-count-download-clicks/#findComment-443770 Share on other sites More sharing options...
balkan7 Posted January 19, 2008 Author Share Posted January 19, 2008 yes man, i wanna count every id and every down_count and get result from down_count: if id 1 is 45 clicks and id 2 is 16 clicks (result = 61) i need this one get result from down_count field. soryy for bad english, maybe you can undestand me. Quote Link to comment https://forums.phpfreaks.com/topic/86829-solved-count-download-clicks/#findComment-443786 Share on other sites More sharing options...
pocobueno1388 Posted January 19, 2008 Share Posted January 19, 2008 I understand now <?php $query = mysql_query("SELECT SUM(down_count) as total FROM tableName")or die(mysql_error()); $row = mysql_fetch_assoc($query); echo $row['total']; //should echo 61 ?> Quote Link to comment https://forums.phpfreaks.com/topic/86829-solved-count-download-clicks/#findComment-443798 Share on other sites More sharing options...
balkan7 Posted January 19, 2008 Author Share Posted January 19, 2008 working perfect, thank you Quote Link to comment https://forums.phpfreaks.com/topic/86829-solved-count-download-clicks/#findComment-443819 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.