php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22352 Numeric Sybase Problem
Submitted: 2003-02-21 06:29 UTC Modified: 2003-02-25 15:36 UTC
From: c dot villemagne at circo dot fr Assigned:
Status: Not a bug Package: Sybase (dblib) related
PHP Version: 4.3.0 OS: Linux Mandrake 9.0
Private report: No CVE-ID: None
 [2003-02-21 06:29 UTC] c dot villemagne at circo dot fr
$id=sybase_query ( "select * from test_numeric", $sybcon);
while ( $row = sybase_fetch_row($id) )
{
echo "<tr><td>$row[0]</td></tr>\n";
}

$row[0] receive value 100.0,200.0 or not 100,200.
Why ?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-24 02:49 UTC] c dot villemagne at circo dot fr
I used the cvs snapshot 
http://snaps.php.net/php4-STABLE-latest.tar.gz
but the problem is the same.
I have always 100.0, 200.0 or not 100,200
Are you a other solution ?
 [2003-02-24 22:28 UTC] iliaa@php.net
What are the fields in the test_numeric table defined as?

 [2003-02-25 01:34 UTC] c dot villemagne at circo dot fr
The field is a numeric !
The summary of this bug is : "numeric sybase Problem" !
 [2003-02-25 15:36 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

NUMERIC fields are treated as doubles, since they could possibily overflow PHP's long, which are limited to a 32 bit number of 32 bit systems and 64 bit number on 64 bit systems. If you want the result to be an integer make sure that field is defined as an integer.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC