#36653 [NEW]: result set returned has wrong (numeric) data
From: info at newneon dot com
Operating system: Win 2000
PHP version: 5.1.2
PHP Bug Type: MSSQL related
Bug description: result set returned has wrong (numeric) data
Description:
------------
I have executed an SQL query with multiple joins (left inners and right
outers). When displaying the result set using print_r, I get the following
result:
[0] => 10005
[Respondent] => 5
[1] => 1
[Result] => 1
[2] => 0
[QuestVersion] => 0
[3] => CHARLIE
[MachineID] => CHARLIE
[4] => 911
[Enqueteur] => 911
[5] => Feb 15 2006 12:00AM
[Datum] => Feb 15 2006 12:00AM
Note the difference between result[0] and result[Respondent]
The proper value is the 10005. How come that PHP converts the 10005 into
5?
Reproduce code:
---------------
Query used:
SELECT * FROM Hoofd LEFT JOIN FillingN ON FillingN.CallCode =
Hoofd.Respondent RIGHT OUTER JOIN Hoofd2 ON
FillingN.CallCode=Hoofd2.Respondent LEFT JOIN Sample ON
FillingN.CallCode=Sample.Code WHERE (Hoofd.Result = 1)
Expected result:
----------------
[0] => 10005
[Respondent] => 10005
[1] => 1
[Result] => 1
Actual result:
--------------
[0] => 10005
[Respondent] => 5
[1] => 1
[Result] => 1
--
Edit bug report at http://bugs.php.net/?id=36653&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36653&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36653&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36653&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36653&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36653&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36653&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36653&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36653&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36653&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36653&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36653&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36653&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36653&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36653&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36653&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36653&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36653&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36653&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36653&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36653&r=mysqlcfg
Thread (5 messages)
- info at newneon dot com