Oracle 5.0 Reference Manual page 2285

Table of Contents

Advertisement

$meta = mysql_fetch_field($result, $i);
if (!$meta) {
echo "No information available<br />\n";
}
echo "<pre>
blob:
max_length:
multiple_key: $meta->multiple_key
name:
not_null:
numeric:
primary_key:
table:
type:
unique_key:
unsigned:
zerofill:
</pre>";
$i++;
}
mysql_free_result($result);
?>
Notes
See Also
mysql_field_seek
20.7.2.5.16.
mysql_fetch_lengths
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysql_fetch_lengths
Get the length of each output in a result
Description
array mysql_fetch_lengths(
resource result);
Returns an array that corresponds to the lengths of each field in the last row fetched by MySQL.
Original MySQL API (Mysql)
$meta->blob
$meta->max_length
$meta->name
$meta->not_null
$meta->numeric
$meta->primary_key
$meta->table
$meta->type
$meta->unique_key
$meta->unsigned
$meta->zerofill
Note
Field names returned by this function are case-sensitive.
Note
If field or tablenames are aliased in the SQL query the aliased name will
be returned. The original name can be retrieved for instance by using
mysqli_result::fetch_field.
Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the
future. Instead, the
also
MySQL: choosing an API
Alternatives to this function include:
mysqli_fetch_lengths
PDOStatement::getColumnMeta
MySQLi
or
PDO_MySQL
guide and
related FAQ
2265
extension should be used. See
for more information.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents