Can you show us your table definition?
Web2py doesn't have float. There are double and decimal field types.
You don't need to use postgres.

Marin


On Fri, Aug 15, 2014 at 10:22 AM, Stefan van den Eertwegh <
stefan.eertw...@gmail.com> wrote:

> I use in the model the type float and MySQL as backend database and MySQL
> uses INT() as datatype for that field....
>
> So i must use decimal(10,2) as field type in the model and as backand db
> postgres?
>
> Op donderdag 14 augustus 2014 21:39:56 UTC+2 schreef Cliff Kachinske:
>>
>> What database?
>>
>> Web2py has a decimal datatype which, in my use cases, mimics the Python
>> decimal datatype. I use Postgresql and the adapter turns Python decimal
>> into Postgres numeric. Both of these types act like real world decimal
>> numbers. In other words, .2 + .1 comes out to .3. Of course a different db
>> backend may work differently.
>>
>> Just google python decimal.
>>
>> On Friday, July 11, 2014 5:50:30 AM UTC-4, Stefan van den Eertwegh wrote:
>>>
>>> Hi,
>>>
>>> I have a float type in the define tables and when he inserts 3.50 into
>>> the database he makes 4.0 off it.
>>> How comes that it rounds off the float? And not uses the usage of 2
>>> decimals?
>>>
>>> Thank you!
>>>
>>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to