Field name function in PHP 5
| From: | Mark | Date: | Wed, 04 Aug 2004 12:17:11 +0000 |
| Subject: | Field name function in PHP 5 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-192689@lists.php.net to get a copy of this message | ||
Hi all,
this function in PHP 5 does not work for me: msql_field_name
(PHP 3>= 3.0.7, PHP 4 , PHP 5)
msql_field_name -- Get field name
Description
string msql_field_name ( resource query_identifier, int field)
msql_field_name() returns the name of the specified field from the
result resource query_identifier. msql_field_name($result, 2);
will return the name of the second field in the result set associated
with the result identifier.
When I write: echo "<th>".msql_field_name($result). "</th>";
I get the error message:
Fatal error: Call to undefined function msql_field_name() in c:\Program Files\Apache
Group\Apache\htdocs\mysqli_send.php on line 37
Does anybody know what is the correct function for field name in PHP 5?
I work with the latest current versions: PHP 5, MySQL 4 and Apache 1.3.31, all for
Windows.
I included the file that I am working in. It is a general program/script for using queries
in MySQL. For now I have replaced msql_field_name by mysqli_fetch_field.
Many thanks,
Mark