View Single Post
  #1  
Old 02-07-2017, 05:15 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 64,231
Dinocanid is on a distinguished road
Default How to subtract a value

This is a very noobish question, but how do you properly subtract a value from all rows in a table? I've tried this:
PHP Code:
$mysidia->db->update("owned_adoptables", array("mood"  => -2)); 
Which changes the value to -2 rather than subtracting 2. And I've tried this:
PHP Code:
$mysidia->db->update("owned_adoptables", array("mood"  2)); 
Which doesn't do anything.
__________________
Reply With Quote