#36653 [Opn->Fbk]: result set returned has wrong (numeric) data

From: Date: Wed, 08 Mar 2006 11:10:51 +0000
Subject: #36653 [Opn->Fbk]: result set returned has wrong (numeric) data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94042@lists.php.net to get a copy of this message
 ID:               36653
 Updated by:       tony2001@php.net
 Reported By:      info at newneon dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         MSSQL related
 Operating System: Win 2000
 PHP Version:      5.1.2
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------

[2006-03-08 12:07:42] info at newneon dot com

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 this bug report at http://bugs.php.net/?id=36653&edit=1


Thread (5 messages)

« previous php.bugs (#94042) next »