Is it possible, in MySQL, to round half a specific way like PHP would do?
PHP_ROUND_HALF_UP
PHP_ROUND_HALF_DOWN
P
If you get an error applying @Jonathan's function saying:
Error 1418: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) SQL Statement:...
You should put DETERMINISTIC
or other applicable declaration before BEGIN
DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled