karimali831 Posted July 4, 2010 Share Posted July 4, 2010 Hi Take a look at attatchment. I want to count all values for "points" column where clanID. clanID = 11 and has 5 points in one row and 5 in another row. Output = 10 points. clanID = 15 and has 10 points only in one row Output = 10 points I'm sure you get it. Thanks for any help [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/206718-count-values/ Share on other sites More sharing options...
Daniel0 Posted July 4, 2010 Share Posted July 4, 2010 SELECT SUM(points) FROM table WHERE clanID = 11; Or: SELECT SUM(points) FROM table GROUP BY clanID; Link to comment https://forums.phpfreaks.com/topic/206718-count-values/#findComment-1081083 Share on other sites More sharing options...
karimali831 Posted July 4, 2010 Author Share Posted July 4, 2010 Great, thanks alot. Link to comment https://forums.phpfreaks.com/topic/206718-count-values/#findComment-1081087 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.