#23661 [NEW]: mysql_fetch_array

From: Date: Fri, 16 May 2003 18:08:35 +0000
Subject: #23661 [NEW]: mysql_fetch_array
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39802@lists.php.net to get a copy of this message
From: rodrigo at euforia dot com dot br Operating system: ALL PHP version: 4.3.2RC3 PHP Bug Type: MySQL related Bug description: mysql_fetch_array 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 bug report at http://bugs.php.net/?id=23661&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23661&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23661&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23661&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23661&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23661&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23661&r=support Expected behavior: http://bugs.php.net/fix.php?id=23661&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23661&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23661&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23661&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23661&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23661&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23661&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23661&r=gnused

« previous php.bugs (#39802) next »