#23661 [Opn->Asn]: mysql_fetch_array
| From: | derick@php.net | Date: | Fri, 16 May 2003 18:50:10 +0000 |
| Subject: | #23661 [Opn->Asn]: mysql_fetch_array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39804@lists.php.net to get a copy of this message | ||
ID: 23661
Updated by: derick@php.net
Reported By: rodrigo at euforia dot com dot br
-Status: Open
+Status: Assigned
Bug Type: MySQL related
Operating System: ALL
PHP Version: 4.3.2RC3
-Assigned To:
+Assigned To: derick
New Comment:
will check this
Previous Comments:
------------------------------------------------------------------------
[2003-05-16 13:08:35] rodrigo at euforia dot com dot br
Hi,
If you use other param then MYSQL_ASSOC, MYSQL_NUM or MYSQL_BOTH in
mysql_fetch_array, the function return an array with size of num
records but with blank values.
This isn't an true bug. But is dificult to user discover where he
mistake.
If the function only accept this params why not mysql_fetch_array don't
return some error message when other params are used?
In older version of PHP this not happend
Kind Regards,
Rodrigo Mourão
From Brasil
<?
$dbhost = "127.0.0.1";
$dbuser = "root";
$dbpasswd = "";
$database = "test";
$db = mysql_connect($dbhost, $dbuser, $dbpasswd);
mysql_select_db($database, $db);
$sql = "SELECT * FROM any";
$result = mysql_query($sql,$db);
print "<b>".mysql_num_rows($result)."
registros</b><br><hr>";
while ($r = mysql_fetch_array($result,$sql)){
foreach ($r AS $campo=>$value){
print $campo."=".$value."<br>";
}
print "<hr>";
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23661&edit=1