[freetds] Decimal part of float fields missing in resulsts of PHP-4.3.0 using sybase_ct with freetds 0.6x

Aliet Santiesteban Sifontes alietss at yahoo.com
Mon Dec 23 10:59:34 EST 2002


Ok this is the code...

$id= mssql_pconnect ($database_host, $database_user,
$database_user_pass);
$r=mssql_select_db ($database_work,$id);
$idres=mssql_query ("SELECT
NUMDOC,FECHA,DESCCONCI,DESCRIPCION,DEBE,HABER,BRUTO,PAGO
FROM submayor WHERE  CODAREA='$Area' and
FECHA>=convert(DATETIME,'$fdesde',102) and
FECHA<=convert(DATETIME,'$fhasta',102)   order by
FECHA",$id);
    $cant=mssql_num_rows ($idres);
    for ($i =1; $i <= $cant; $i++) {
           $row = mssql_fetch_array ($idres);
           $NUMDOC=$row["NUMDOC"];
           $FECHCOB=$row["FECHA"];
           $DESCCLI=$row["DESCCONCI"];
           $OBSERVAC=$row["DESCRIPCION"];
           $DEBE=$row["DEBE"];
	   $HABER=$row["HABER"];
	   $BRUTO=$row["BRUTO"];
	   $PAGO=$row["PAGO"];
           $NUMDOC=trim($NUMDOC);
           $FECHCOB=trim($FECHCOB);
           $DESCCLI=trim($DESCCLI);
           $OBSERVAC=trim($OBSERVAC);
           $DEBE=trim($DEBE);
	   $HABER=trim($HABER);
           $BRUTO=trim($BRUTO);
	   $PAGO=trim($PAGO);
}

DEBE,HABER,BRUTO,PAGO are fields of type float in a
MSSQL Server 2000, I'm using TDS version 7.0 and is
the same with TDS 8.0, PHP-4.3.0, I think that the
problem is related to the php versión beacause with
php-4.2.x was ok.
--- Frediano Ziglio <freddyz77 at tin.it> wrote:
> Il dom, 2002-12-22 alle 22:49, Aliet Santiesteban
> Sifontes ha scritto:
> > Hi boys, I'm using freetds-0.6x the x is beacuse
> I'm
> > testing all the snapshots with PHP-4.3.0 ,
> sybase_ct
> > throught freetds on a RedHat 8.0 httpd-2.0.43-13,
> in
> > the past php-4.2.x the float fields worked well
> for me
> > with the same freetds versión, but now the decimal
> > part is missing in the results, example, of a
> result
> > that should be 3.50 I just get 3, I'm quering  a
> MSSQL
> > 2000 I test it with tdsver 7.0 and 8.0. I'm going
> to
> > thank's your help.
> >                             Any Ideas??
> >                                   Bye Aliet
> > 
> 
> Quite strange... can you post some snip of code?
> 
> freddy77
> 
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the FreeTDS mailing list