mattm1712 Posted April 11, 2011 Share Posted April 11, 2011 im trying to count up all the rating values were imageid is equal to 22, my table looks like this,, (table name is imagerating) imageid rating 22 2 23 3 23 4 22 4 22 3 please help Quote Link to comment https://forums.phpfreaks.com/topic/233397-help-how-do-i-count-certain-values-in-a-table-row/ Share on other sites More sharing options...
Maq Posted April 11, 2011 Share Posted April 11, 2011 Have a read here: http://dev.mysql.com/doc/refman/5.1/en/counting-rows.html Quote Link to comment https://forums.phpfreaks.com/topic/233397-help-how-do-i-count-certain-values-in-a-table-row/#findComment-1200222 Share on other sites More sharing options...
mattm1712 Posted April 11, 2011 Author Share Posted April 11, 2011 sorry i need to add the values up aswel Quote Link to comment https://forums.phpfreaks.com/topic/233397-help-how-do-i-count-certain-values-in-a-table-row/#findComment-1200224 Share on other sites More sharing options...
Maq Posted April 11, 2011 Share Posted April 11, 2011 Have a read here: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_sum Quote Link to comment https://forums.phpfreaks.com/topic/233397-help-how-do-i-count-certain-values-in-a-table-row/#findComment-1200227 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.