| | I got a question, is there a way to subtract from something like the following: $var = $row['SUM(Field)']-$var2; Is there a way to subtract from a SUM result and have it distrubted? Or do I have to do some other complex stuff? Thanks, SF |
|
|
I don't see any logic here, if you want to get the SUM of some-kind mysql field, then you need to get it into a variable or array and use it.
I got someone on my team to do it...using a simple array loop thing, I fixed it though
Arrays (other than mysql ones) just totally leave me confused. I got a question, is there a way to subtract from something like the following: $var = $row['SUM(Field)']-$var2; Is there a way to subtract from a SUM result and have it distrubted? Or do I have to do some other complex stuff? Thanks, SF I don't really understand what you say, now i guess that you got the sum result from a db query and then you need to subtract the $var2 to it and show it, well i only say that yes you can do it as usual. Best regards,
or another thing, that he wants the last result of the array, if so then you rather go and learn what is an array and just do some practical work, I am quite confused.
|
|
![]() Sql/php Arithemetic Question |