PHP Classes

Float or Double Format

Recommend this page to a friend!

      PHPXBase  >  All threads  >  Float or Double Format  >  (Un) Subscribe thread alerts  
Subject:Float or Double Format
Summary:Float or Double Format problem
Messages:2
Author:Nabih
Date:2007-07-30 09:39:28
Update:2007-09-12 20:58:18
 

  1. Float or Double Format   Reply   Report abuse  
Picture of Nabih Nabih - 2007-07-30 09:39:28
I'm trying to use this class and I'm having a problme, it doesn't read Float numbers :S, it recognizes the type as N and rounds the number.
Please help me if you can.

  2. Re: Float or Double Format   Reply   Report abuse  
Picture of Jirka Jirka - 2007-09-12 20:58:18 - In reply to message 1 from Nabih
Hi I had the same problem
solution which works for me:

The "float" column was defined as "numeric" (try to check col headers from test.php)
Numeric fields are read as INT

find function getInt($columnObj) //line 170 Record.class.php
change line:
return intval($s); //175
to
return floatval($s);
Jirka