SilverFox1405241541 0 Report post Posted June 15, 2007 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 Share this post Link to post Share on other sites
Quatrux 4 Report post Posted June 16, 2007 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. Share this post Link to post Share on other sites
SilverFox1405241541 0 Report post Posted June 16, 2007 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. Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted June 16, 2007 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,SFI 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, Share this post Link to post Share on other sites
Quatrux 4 Report post Posted June 16, 2007 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. Share this post Link to post Share on other sites