Welcome to WebmasterWorld Guest from 54.234.38.8

Forum Moderators: open

Message Too Old, No Replies

Rounding calculation in mysql

how to round

     

playadonna

7:14 pm on Sep 18, 2005 (gmt 0)

Inactive Member
Account Expired

 
 

im doing calculation in mysql how do your round up to 5.00
Ie:
if the answer is 123 want it to round up to 125

like using ceiling in excel

1:53 am on Sept 19, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


I'm not sure you can round 123 up to 125 with a command, but the math functions of mySQL can be found here:

[dev.mysql.com...]

There is a CEIL command but it rounds up to the integer, not to within an integer.