Jump to content

Math Operations


alexguz79

Recommended Posts

I think you woudl have to do this in PHP, doubt mysql has that feature - but why would you want to do this?

 

anyway something like this after that query:

$row_total = $row['row_total'];
$inverted = 0 - $row_total;

 

 

-cb-

 

How is that different from

SELECT -SUM(row) AS row_total FROM table

or

SELECT SUM(-row) AS row_total FROM table

or even

$inverted = -$row_total;

?

Link to comment
https://forums.phpfreaks.com/topic/206897-math-operations/#findComment-1081984
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.