There are MYSQLI_TYPE_* constants for the type property (listed in http://php.net/manual/en/ref.mysqli.php).
e.g.
<?php
if ($finfo->type == MYSQLI_TYPE_VAR_STRING)
// a VARCHAR
mysqli_fetch_field(PHP 5) mysqli_fetch_field(no version information, might be only in CVS) result->fetch_field -- Returns the next field in the result setDescriptionProcedural style: object mysqli_fetch_field ( mysqli_result result )Object oriented style (method): class mysqli_result {object fetch_field ( void ) } The mysqli_fetch_field() returns the definition of one column of a result set as an object. Call this function repeatedly to retrieve information about all columns in the result set. mysqli_fetch_field() returns FALSE when no more fields are left. 返回值Returns an object which contains field definition information or FALSE if no field information is available.
表格 1. Object properties
范例
上例将输出:
dedlfix
19-Jul-2006 01:26
There are MYSQLI_TYPE_* constants for the type property (listed in http://php.net/manual/en/ref.mysqli.php).
jakerosoft at hotmail dot com
17-Aug-2005 12:15
<?
Marc-Andr
08-Jul-2005 06:56
The "type" property will return a numerical representation of a field type instead of a "meaningful" string. | |||||||||||||||||||||||||