ID:               40400
 Updated by:       [EMAIL PROTECTED]
 Reported By:      guillaume dot david at noos dot fr
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQL related
 Operating System: Windows 2000
 PHP Version:      5.2.0
 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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Not PHP problem.


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

[2007-02-08 11:18:29] guillaume dot david at noos dot fr

This bug doesn't seem to happen on other servers.

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

[2007-02-08 10:49:40] guillaume dot david at noos dot fr

Description:
------------
I thinks i have found a bug in the mysql_fetch_row, mysql_fetch_array
and mysql_fetch_assoc functions.

When I select twice the same field with 2 different tags, mysql_fetch_*
always return the same line.


Reproduce code:
---------------
<?php

include "conf.php";
$sql = "SELECT DISTINCT page as CHAMP, page as VALEUR FROM logs WHERE 1
ORDER BY CHAMP ASC";
$q = mysql_query($sql) or die (mysql_error());
while($foo = mysql_fetch_array($q))
{
        print_r($foo); echo '<br>';
}
?>


Expected result:
----------------
Array ( [0] => accueil.php [CHAMP] => accueil.php [1] => accueil.php
[VALEUR] => accueil.php ) 
Array ( [0] => logs.php [CHAMP] => logs.php [1] => logs.php [VALEUR] =>
logs.php ) 


Actual result:
--------------
Array ( [0] => logs.php [CHAMP] => logs.php [1] => logs.php [VALEUR] =>
logs.php ) 
Array ( [0] => logs.php [CHAMP] => logs.php [1] => logs.php [VALEUR] =>
logs.php ) 



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


-- 
Edit this bug report at http://bugs.php.net/?id=40400&edit=1

Reply via email to