Jump to content
xisto Community
SilverFox1405241541

Sql/php Arithemetic Question

Recommended Posts

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

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,

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.