Web Hosting Talk







View Full Version : PHP+InterBase trouble


xelav
02-23-2004, 06:46 PM
I have interbase table with FLOAT type field
when i want to store for example 0.7, it stores something like 0.699999988079. I think, the problem in incompatibility of numeric formats, but not sure. If you know, how to solve it, please, help

Burhan
02-25-2004, 08:32 AM
Set the precision of your float field so that it only accepts one number after the decimal.

Brightadmin
02-26-2004, 02:40 AM
Hi,

As suggested by fyrestrtr , the problem is incompatibility with numeric declaration format. Generally the float field can declared using different float formats such as FLOAT, DOUBLE, D_FLOAT. So if you want to store the value as 0.7 then delcare FLOAT Format with precision value as 1 . If you want to store with more precisions then you can declare DOUBLE and D_FLOAT formats .


Regards,