Commit 5923badf authored by Luke's avatar Luke

Changed inc() and dec() methods to support float

It's valid to increment a field by a float, this allows both ints and floats to be used in increments and decrements.
parent 16d88ae2
......@@ -1280,18 +1280,18 @@ class MysqliDb
/**
* Method generates incremental function call
* @param int increment amount. 1 by default
* @param int increment by int or float. 1 by default
*/
public function inc($num = 1) {
return Array ("[I]" => "+" . (int)$num);
return Array ("[I]" => "+" . $num);
}
/**
* Method generates decrimental function call
* @param int increment amount. 1 by default
* @param int increment by int or float. 1 by default
*/
public function dec ($num = 1) {
return Array ("[I]" => "-" . (int)$num);
return Array ("[I]" => "-" . $num);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment