Skip to Content.
Sympa Menu

freetds - Re: Can't display decimal from MS SQL 7.0. Need Help 911!!!

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Can't display decimal from MS SQL 7.0. Need Help 911!!!
  • Date: Tue, 12 Dec 2000 15:59:01 -0500 (EST)



What version of the protocol are you using? 4.2 or 7.0?

Brian

On Tue, 12 Dec 2000, bao nguyen wrote:

> Hi,
>
> I was able to insert, delete, and query out from MSSQL7.0(SP2) using
> PHP4.0.2, Apache1.3.9, FreeTDS 0.51 from Linux 6.1 . There is only one
> problem displaying decimal. Example, TDSTable has the following fields
>
> (int) (dec) (dec) (dec)
> RecordID ProdWt BoxWt Price
> 93 12.50 5.67 18.00
>
> <?php
> $connection = mssql_connect("localhost", "admin", "xxx");
> $db = mssql_select_db("test", $connection);
>
> $sql = "SELECT * FROM TDSTable WHERE RecordID = 93";
> $sql_result = mssql_query($sql);
>
> while( $row = mssql_fetch_array($sql_result) )
> {
> echo ("Product Weight: $row[ProdWt]<br>");
> echo ("Box Weight: $row[BoxWt]<br>");
> echo ("Price: $row[Price]<br>");
> }
> ?>
> This is the result that I got.
>
> Product Weight: 12
> Box Weight: 5
> Price: 1
>
> What had I done wrong ? Is there any clue ???
>
> Thanks,
> Bn
>





Archive powered by MHonArc 2.6.24.

Top of Page