php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21662 single data type not well returned
Submitted: 2003-01-15 09:06 UTC Modified: 2003-02-09 03:08 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: egarcia at egm dot as Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.3.1.1 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: egarcia at egm dot as
New email:
PHP Version: OS:

 

 [2003-01-15 09:06 UTC] egarcia at egm dot as
In the PHP 4.3.0 exists a bug with the MSSQL single datatype, in the follow var_dump, you can see the PUNTAJE field.

array(6) {
  [0]=>
  string(7) "3422864"
  ["ID"]=>
  string(7) "3422864"
  [1]=>
  string(20) "3.2051283432282E-306"
  ["PUNTAJE"]=>
  string(20) "3.2051283432282E-306"
  [2]=>
  string(10) "7725000.00"
  ["ADJUDICADO"]=>
  string(10) "7725000.00"
}

But in PHP 4.2.3 the bug doesn't exists, like you can see:

array(6) {
  [0]=>
  string(7) "3422864"
  ["ID"]=>
  string(7) "3422864"
  [1]=>
  string(7) "175.652"
  ["PUNTAJE"]=>
  string(7) "175.652"
  [2]=>
  string(10) "7725000.00"
  ["ADJUDICADO"]=>
  string(10) "7725000.00"
}

The MSSQL fields data type are:

ID = int
PUNTAJE = single
ADJUDICADO = money

The PHP.ini is the same for both versions, the only change is the PHP version with its extensions.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-15 09:21 UTC] egarcia at egm dot as
The function used to get the data is:

$row = mssql_fetch_array($query_id);
var_dump($row);

Thanks in advance
 [2003-01-16 08:09 UTC] egarcia at egm dot as
Acord to your sugestion I use the last php4 stable win version (January 16, 2003, 8:35:37 AM)

I get the original error and many errors more, please tell me how can I help.

array(12) {
  [0]=>
  string(7) "3422864"
  ["ID"]=>
  string(7) "3422864"
  [1]=>
  float(2.2791297027772E-304)
  ["PUNTAJE"]=>
  float(2.2791297027772E-304)
  [2]=>
  string(10) "7725000.00"
  ["ADJUDICADO"]=>
  string(10) "7725000.00"
}

PHP has encountered an Access Violation at 00BB1493.
 [2003-02-09 03:08 UTC] fmk@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC