majhate Posted January 13, 2008 Share Posted January 13, 2008 Hello, Lets say I have a table with the fields: ID, Color, Value So.. ID - Color - Value 1 - Blue - 3 2 - Orange - 1 3 - Black - 4 4 - Red - 2 How would I get the total of the values in one varible. so $total would = 10 I've been trying loops, but I cannot get this to work. Any sugguestions? Thanks! Link to comment https://forums.phpfreaks.com/topic/85849-solved-get-all-values-in-column/ Share on other sites More sharing options...
revraz Posted January 13, 2008 Share Posted January 13, 2008 As I posted in your other thread exactly like this, use the SUM function. Link to comment https://forums.phpfreaks.com/topic/85849-solved-get-all-values-in-column/#findComment-438235 Share on other sites More sharing options...
toplay Posted January 13, 2008 Share Posted January 13, 2008 majhate do not post the same or similar topic more than once. This topic is now locked. Link to comment https://forums.phpfreaks.com/topic/85849-solved-get-all-values-in-column/#findComment-438371 Share on other sites More sharing options...
Recommended Posts