#36421 [Opn->Fbk]: Empty fields are retrieved by odbc_result on jions
| From: | tony2001@php.net | Date: | Thu, 16 Feb 2006 17:56:58 +0000 |
| Subject: | #36421 [Opn->Fbk]: Empty fields are retrieved by odbc_result on jions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93355@lists.php.net to get a copy of this message | ||
ID: 36421
Updated by: tony2001@php.net
Reported By: michael dot rachow at gmail dot com
-Status: Open
+Status: Feedback
-Bug Type: MSSQL related
+Bug Type: ODBC related
Operating System: XP Pro
PHP Version: 4.4.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-02-16 18:41:50] michael dot rachow at gmail dot com
Description:
------------
Two tables A and B.
A is left joined to B on one integer column.
For all records where joined column of table A contains a null value
all fields of the record in resultset are empty. The resultset usually
containes more than one record.
The records are retrieved by
odbc_result.
This is observed only on SQL Server 2005 Express.
Checked with PHP 4.4.2 and 4.4.1
I have the original Windows build of PHP 4.4.2
Reproduce code:
---------------
Table A
cint integer
cstr char
...
Table B
cint integer
cstr char
...
... A left join B on A.cint = B.cint ...
Expected result:
----------------
If A.cint is null only B.cstr should be empty.
Actual result:
--------------
All selected fields A.cint, A.cstr, B.cint, B.cstr are empty when
retrieving them with odbc_result.
When A.cint cotains an integer where a record with A.cint = B.cint
exists all data are retrieved.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36421&edit=1