php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4984 mysql_list_fields has problems ...
Submitted: 2000-06-12 17:50 UTC Modified: 2000-08-06 00:38 UTC
From: lwillis at plus dot net dot uk Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.0 Release OS: Linux 2.2.14-15mdk
Private report: No CVE-ID: None
 [2000-06-12 17:50 UTC] lwillis at plus dot net dot uk
The following script produces an error:

<?

    $chan = mysql_connect ("localhost", "user", "pass") or die ("No connect");
    mysql_select_db ("existing_db", $chan) or die ("Couldn't select");
    $result = mysql_list_fields("existing_table", $chan) or die ("Couldn't list fields");

?>

The output I get is:
Warning: Unable to save MySQL query result in /usr/local/apache/docs/mbug.php on line 5
Couldn't list fields

We're 90% sure that this all worked in PHP 3.0 :(

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-26 20:34 UTC] zak@php.net
I will try to confirm this bug.
 [2000-08-06 00:38 UTC] zak@php.net
Please reread the documentation on mysql_list_fields.
The second argument should be a table name, not a mysql result identifier.

Tests using mysql_list_fields ('database_name', 'table_name') and mysql_list_fields ('database_name', 'table_name', $result_id) works as documented.

If - after making syntax changes - the error still occurs, please reopen the bug report.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 02:00:01 2026 UTC