PHP mysqli_fetch_field_direct() 函数 PHP MySQLi 参考手册 返回结果集中某个单一字段(列)的 meta-data,并输出字段名称、表格和最大长度: 定义和用法 mysqli_fetch_field_direct() 函数从结果集中取得某个单一字段(列)的 meta-data,并作为对象返回。 语法 m
这里的fieldnr是一个整数,它代表字段在结果集中从0开始的索引,其范围应该在0到mysql_num_fields(result)减1之间,其中mysql_num_fields(result)表示结果集中列的数量。通过调用mysql_fetch_field_direct,你可以针对任意列获取其字段类型、名称、长度、是否可为空等属性信息。这个函数执行时,如果指定的...
MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res, unsigned int fieldnr); res - a result set identifier returned by mysql_store_result() or mysql_use_result(). fieldnr - the field number. This value must be within the range from 0 to number of fields - 1 Description Return...
MYSQL_FIELD*mysql_fetch_field_direct(MYSQL_RES*result,unsignedintfieldnr) Description Given a field numberfieldnrfor a column within a result set, returns that column's field definition as aMYSQL_FIELDstructure. Use this function to retrieve the definition for an arbitrary column. Specify a value...
Given a field numberfieldnrfor a column within a result set, returns that column's field definition as aMYSQL_FIELDstructure. Use this function to retrieve the definition for an arbitrary column. Specify a value forfieldnrin the range from 0 tomysql_num_fields(result)-1. ...
MYSQL_FIELD*mysql_fetch_field_direct(MYSQL_RES*result,unsignedintfieldnr) Description Given a field numberfieldnrfor a column within a result set, returns that column's field definition as aMYSQL_FIELDstructure. Use this function to retrieve the definition for an arbitrary column. Specify a value...
mysqli_result::fetch_field_direct file: reference/mysqli/msqli_result/fetch-field-direct.xml The "returnvalues" section currently reads: Returns an object which contains field definition information or &false; if no field information for...
Re: mysql_fetch_field_direct() bug? 500 Dave Juntgen December 26, 2005 04:39PM Re: mysql_fetch_field_direct() bug? 473 Konstantin Osipov December 27, 2005 05:49AM Sorry, you can't reply to this topic. It has been closed.
($result = mysqli_query($link, $query)) { /* Get field information for column 'SurfaceArea' */ $finfo = mysqli_fetch_field_direct($result, 1); printf("Name: %s\n", $finfo->name); printf("Table: %s\n", $finfo->table); printf("max. Len: %d\n", $finfo->max_length); ...
mysqli_result::fetch_field_direct -- mysqli_fetch_field_direct— Fetch meta-data for a single field说明 面向对象风格 public mysqli_result::fetch_field_direct(int $index): object|false 过程化风格 mysqli_fetch_field_direct(mysqli_result $result, int $index): object|false Returns an object...