Oracle 5.0 Reference Manual page 2292

Table of Contents

Advertisement

See Also
mysql_fetch_lengths
strlen
20.7.2.5.21.
mysql_field_name
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysql_field_name
Get the name of the specified field in a result
Description
string mysql_field_name(
resource result,
int field_offset);
mysql_field_name
Parameters
result
field_offset
Return Values
The name of the specified field index on success or
Examples
Example 20.50.
<?php
/* The users table consists of three fields:
*
user_id
*
username
*
password.
*/
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect to MySQL server: ' . mysql_error());
}
Original MySQL API (Mysql)
Note
For backward compatibility, the following deprecated alias may be used:
mysql_fieldlen
Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the
future. Instead, the
MySQLi
also
MySQL: choosing an API
Alternatives to this function include:
mysqli_fetch_field_direct
PDOStatement::getColumnMeta
returns the name of the specified field index.
The result resource that is being evaluated. This result comes from
a call to mysql_query.
The numerical field offset. The
field_offset
issued.
example
mysql_field_name
or
PDO_MySQL
extension should be used. See
guide and
related FAQ
[name] or [orgname]
[name]
field_offset
does not exist, an error of level
on failure.
FALSE
2272
for more information.
starts at 0. If
E_WARNING
is also

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents