Oracle 5.0 Reference Manual page 2295

Table of Contents

Advertisement

$result = mysql_query($query);
// Lists the table name and then the field name
for ($i = 0; $i < mysql_num_fields($result); ++$i) {
$table = mysql_field_table($result, $i);
$field = mysql_field_name($result, $i);
echo
"$table: $field\n";
}
?>
Notes
See Also
mysql_list_tables
20.7.2.5.24.
mysql_field_type
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysql_field_type
Get the type of the specified field in a result
Description
string mysql_field_type(
resource result,
int field_offset);
mysql_field_type
the field type is returned instead.
Parameters
result
field_offset
Return Values
The returned field type will be one of "int", "real", "string", "blob", and others as detailed in
the
MySQL
documentation.
Original MySQL API (Mysql)
Note
For backward compatibility, the following deprecated alias may be used:
mysql_fieldtable
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
is similar to the
mysql_field_name
The result resource that is being evaluated. This result comes from
a call to mysql_query.
The numerical field offset. The
field_offset
issued.
or
PDO_MySQL
extension should be used. See
guide and
related FAQ
[type]
[driver:decl_type] or [pdo_type]
function. The arguments are identical, but
field_offset
does not exist, an error of level
2275
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