When you use subtraction between integer values where one is of type
UNSIGNED, the result is unsigned unless the NO_UNSIGNED_SUBTRACTION SQL
mode is enabled. See Section 12.10, “Cast Functions and Operators”.
`character_set_connection`='utf8',
`character_set_database`='utf8',
`character_set_server`='utf8'", $file . ':' . __FUNCTION__, $line . ':' . __LINE__);
+
+ // Disallow subtraction for unsigned columns
+ sqlQuery("SET `sql_mode`='NO_UNSIGNED_SUBTRACTION'", $file . ':' . __FUNCTION__, $line . ':' . __LINE__);
} // END - if
// Return the resource
`character_set_connection`='utf8',
`character_set_database`='utf8',
`character_set_server`='utf8'", $file . ':' . __FUNCTION__, $line . ':' . __LINE__);
+
+ // Disallow subtraction for unsigned columns
+ sqlQuery("SET `sql_mode`='NO_UNSIGNED_SUBTRACTION'", $file . ':' . __FUNCTION__, $line . ':' . __LINE__);
} // END - if
// Any errors encountered?