#20078 [Opn->Bgs]: Error with left join
| From: | derick@php.net | Date: | Fri, 25 Oct 2002 09:08:12 +0000 |
| Subject: | #20078 [Opn->Bgs]: Error with left join | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-23285@lists.php.net to get a copy of this message | ||
ID: 20078
Updated by: derick@php.net
Reported By: f.giovannini@netechnologies.it
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Linux 2.4.18
PHP Version: 4.2.1
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-10-25 04:07:24] f.giovannini@netechnologies.it
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 this bug report at http://bugs.php.net/?id=20078&edit=1