PHP mysqli_field_seek() Function
Set the field pointer to the first field (column) in the result set, then retrieve field information with mysqli_fetch_field() and output the field name, table and maximum length:
name);
echo "
";
printf("表名: %s",$fieldinfo->table);
echo "
";
printf("字段长度: %d",$fieldinfo->max_length);
// Release the result set
mysqli_free_result($result);
}
mysqli_close($con);
?>
Definition and Usage
The mysqli_field_seek() function sets the field pointer to the offset of the specified field.
Syntax
mysqli_field_seek(
result,fieldnr
)
;
| Parameters | Description |
|---|---|
| result | Required. Specifies the result set identifier returned by mysqli_query(), mysqli_store_result(), or mysqli_use_result(). |
| fieldnr | Required. Specifies the field number. It must be between 0 and the number of fields - 1. |
Technical Details
| Return Value: | Returns TRUE on success, FALSE on failure. |
|---|---|
| PHP Version: | 5+ |
PHP MySQLi Reference Manual