Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Aliet Santiesteban Sifontes <alietss AT yahoo.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] Decimal part of float fields missing in resulsts of PHP-4.3.0 using sybase_ct with freetds 0.6x
  • Date: Mon, 23 Dec 2002 10:59:34 -0800 (PST)

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




Archive powered by MHonArc 2.6.24.

Top of Page