ID: 20078 User updated by: [EMAIL PROTECTED] -Summary: Error with left join Reported By: [EMAIL PROTECTED] -Status: Bogus +Status: Open Bug Type: MySQL related Operating System: Linux 2.4.18 PHP Version: 4.2.1 New Comment:
This problem is verified with any mysql version.... $array Previous Comments: ------------------------------------------------------------------------ [2002-10-25 04:08:12] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [2002-10-25 04:07:24] [EMAIL PROTECTED] 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