ID:               20078
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         MySQL related
 Operating System: Linux 2.4.18
 PHP Version:      4.2.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

If you use mysql_fetch_array with MYSQL_FETCH_ASSOC, be sure that
fieldnames are unique.

Georg


Previous Comments:
------------------------------------------------------------------------

[2002-10-25 04:23:20] [EMAIL PROTECTED]

What 'not enough information' meens in this case, is the lack of a
short, self contained, copy/paste/run script, so we can try to
reproduce the problem.

------------------------------------------------------------------------

[2002-10-25 04:15:21] [EMAIL PROTECTED]

This problem is verified with any mysql version....
$array

------------------------------------------------------------------------

[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

Reply via email to