PHP 4.0 Bug #5750 Updated: mysql_list_fields() returns no rows
| From: | Bug Database | Date: | Mon, 24 Jul 2000 00:06:09 +0000 |
| Subject: | PHP 4.0 Bug #5750 Updated: mysql_list_fields() returns no rows | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-25628@lists.php.net to get a copy of this message | ||
ID: 5750
Updated by: rasmus
Reported By: bughuntr@ctelcom.net
Status: Closed
Bug Type: MySQL related
Assigned To:
Comments:
Here is an example that illustrates how it should be written:
<?php
mysql_connect("127.0.0.1","nobody","");
$result = mysql_list_fields("php3","bugdb");
$num = mysql_num_fields($result);
for($i=0;$i<$num;$i++) {
$name = mysql_field_name($result,$i);
$type = mysql_field_type($result,$i);
echo "$name $type\n";
}
?>
Full Bug description available at: http://bugs.php.net/?id=5750