★ wanayoo — archive 1999 http://fr.php.net/manual/it/function.mysql-field-name.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to MySQL
Quick Reference
English version of this pageGerman version of this pageJapanese version of this page
Italian version of this pageFrench version of this pageHungarian version of this page
Spanish version of this pageDutch version of this pageBrazilian Portuguese version of this page
Korean version of this pageCzech version of this page
MySQL
* mysql_affected_rows
* mysql_change_user
* mysql_close
* mysql_connect
* mysql_create_db
* mysql_data_seek
* mysql_db_name
* mysql_db_query
* mysql_drop_db
* mysql_errno
* mysql_error
* mysql_fetch_array
* mysql_fetch_assoc
* mysql_fetch_field
* mysql_fetch_lengths
* mysql_fetch_object
* mysql_fetch_row
* mysql_field_flags
* mysql_field_name
* mysql_field_len
* mysql_field_seek
* mysql_field_table
* mysql_field_type
* mysql_free_result
* mysql_insert_id
* mysql_list_dbs
* mysql_list_fields
* mysql_list_tables
* mysql_num_fields
* mysql_num_rows
* mysql_pconnect
* mysql_query
* mysql_result
* mysql_select_db
* mysql_tablename

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: mysql_field_name
View the source code for this pageSearch the site



Previous page
 mysql_field_flags
 Updated
Tue, 27 Feb 2001
mysql_field_len 
Next page


mysql_field_name

(PHP 3, PHP 4 )

mysql_field_name --  Get the name of the specified field in a result

Description

string mysql_field_name (int result, int field_index)

mysql_field_name() returns the name of the specified field index. result must be a valid result identifier and field_index is the numerical offset of the field.

Nota: field_index starts at 0.

e.g. The index of the third field would actually be 2, the index of the fourth field would be 3 and so on.

Esempio 1. mysql_field_name() example


// The users table consists of three fields: 
//   user_id
//   username
//   password.

$res = mysql_db_query("users", "select * from users", $link);

echo mysql_field_name($res, 0) . "\n";
echo mysql_field_name($res, 2);
      

The above example would produce the following output:


user_id
password
      

For downwards compatibility mysql_fieldname() can also be used.


 About Notes


Previous page
 mysql_field_flags
 Updated
Tue, 27 Feb 2001
mysql_field_len 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
France
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.