Strange behaviour of Interbase DECIMAL

admin

Administrator
Staff member
I'm using php 4.0.6 for Windows and Interbase as back-end database and I've come across a strange thing:
I have a table with a DECIMAL column, defined as DECIMAL(10,3), according to the manual it should hold numbers in this format ppppppp.sss, and it does. The problem comes when I fetch the data through php with ibase_fetch_object. All numbers stored in tahat column are returned as integers, with a dot and the number of decimals.
Example:
Stored data:
7,524 4,235 1,098
Returned data:
7,3 4,3 1,3

If I change the data type to DECIMAL(10,4) I get:
7,4 4,4 1,4

Is this a known problem (bug,maybe) ?
Can anyone tell me what's going on?

Thank you very much in advance...


Lucas
 
Back
Top