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 ! 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. 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. 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 ?> 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 Link to comment https://forums.phpfreaks.com/topic/86829-solved-count-download-clicks/#findComment-443819 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.