From: michael dot rachow at gmail dot com Operating system: XP Pro PHP version: 4.4.2 PHP Bug Type: MSSQL related Bug description: Empty fields are retrieved by odbc_result on jions
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 bug report at http://bugs.php.net/?id=36421&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36421&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36421&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36421&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36421&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36421&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36421&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36421&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36421&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36421&r=support Expected behavior: http://bugs.php.net/fix.php?id=36421&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36421&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36421&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36421&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36421&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36421&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36421&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36421&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36421&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36421&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36421&r=mysqlcfg
