From:             [EMAIL PROTECTED]
Operating system: Linux 2.4.18
PHP version:      4.2.1
PHP Bug Type:     MySQL related
Bug description:  Error with left join

Using mysql_fetch_array function if submit an query with left join es.:
select * from A left join B on (A.index_c=B.index_c)

the resulting array contains fields of table B with NULL value if
condition is not matched
es.:

A table:
----------------------------
| index | index_c | X | P  |
----------------------------
|   1   |    1    | 1 |  1 |
----------------------------
|   1   |  NULL   | 1 |  1 |
----------------------------
B table:
-------------------
| index_c | P | D |
-------------------
|    1    | 1 | 2 |
-------------------
Array result:
---------------------------------
| index | index_c | X | P  |  D |
---------------------------------
|   1   |    1    | 1 | 1  |  2 |
---------------------------------
|   1   |  NULL   | 1 |NULL|NULL|
---------------------------------

with command line mysql:
---------------------------------
| index | index_c | X | P  |  D |
---------------------------------
|   1   |    1    | 1 | 1  |  2 |
---------------------------------
|   1   |  NULL   | 1 | 1  |    |
---------------------------------

bye
-- 
Edit bug report at http://bugs.php.net/?id=20078&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20078&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20078&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20078&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20078&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20078&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20078&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20078&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20078&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20078&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20078&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20078&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20078&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20078&r=isapi

Reply via email to