#20078 [Bgs->Opn]: Error with left join with mysql_fetch_array()

From: Date: Fri, 25 Oct 2002 09:15:21 +0000
Subject: #20078 [Bgs->Opn]: Error with left join with mysql_fetch_array()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-23287@lists.php.net to get a copy of this message
ID: 20078 User updated by: f.giovannini@netechnologies.it -Summary: Error with left join Reported By: f.giovannini@netechnologies.it -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] derick@php.net 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] 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

« previous php.bugs (#23287) next »