This topic is locked

Using decimals in a numbr field

12/17/2007 1:08:02 PM
PHPRunner General questions
R
renegadekn author

I'm using a database to track my time on different projects. I defined the field "time" as a decimal in the mysql db. I have already tried it as an INT.

What happens when I put in .75 or .5, the form will round it up to an hour. I want to be able to display it as 1.5 or .75, etc. I know I have to be missing something pretty simple.

Any suggestions would be great.
Thanks,
-Rob

A
alang 12/17/2007

You should be able to display the number with a fixed number of digits after the decimal point (2 for example) by defining it in MySQL as DECIMAL(10,2). Then in PHPRunner specify the View As "Number" on the visual editor page.