j.smith1981 Posted February 23, 2010 Share Posted February 23, 2010 I have a problem or question regarding the SUM function. I know we have to group by a column for to allow the use of the SUM function to total up a numeric value of a column. Whats the easiest way, (I suppose this could be a PHP problem), to show all details in rows rather than combining them in one result. Say this following example: (state as it is now) Orderid Total Status order1 | 10 | C order2 35 C Then when I group it: order1 | 10 | C How would I show both these results (as in both orderid 1 and orderid 2) in mysql but then totalling them up? Kind regards, Jeremy. Quote Link to comment https://forums.phpfreaks.com/topic/193076-sum-function-question-regarding-group-by/ Share on other sites More sharing options...
fenway Posted February 24, 2010 Share Posted February 24, 2010 Sorry, I don't follow -- what's the difference? Quote Link to comment https://forums.phpfreaks.com/topic/193076-sum-function-question-regarding-group-by/#findComment-1017640 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.