mysqli_fetch_field_direct() 函数从结果集中取得某个单一字段(列)的 meta-data,并作为对象返回。 语法 mysqli_fetch_field_direct(result,fieldnr); 参数描述 result必需。规定由 mysqli_query()、mysqli_store_result() 或 mysqli_use_result() 返回的结果集标识符。
{//获取字段 "name" 的信息$fieldinfo=mysqli_fetch_field_direct($result,1);printf("字段名: %s",$fieldinfo->name);echo"<br>";printf("数据表: %s",$fieldinfo->table);echo"<br>";printf("最大长度: %d",$fieldinfo->max_length);//释放结果集mysqli_free_result($result); }mysqli_close($...
if (mysqli_connect_errno($con)) { echo "连接 MySQL 失败: " . mysqli_connect_error(); } $sql="SELECT name,url FROM websites ORDER BY alexa"; if ($result=mysqli_query($con,$sql)) { // 获取字段 "name" 的信息 $fieldinfo=mysqli_fetch_field_direct($result,1); printf("字段名: ...
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 specified fieldnr is available. However, there is no 'fiel...
($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_fetch_field_direct(mysqli_result $result, int $index): object|false Returns an object which contains field definition information from the specified result set. 参数 result 仅以过程化样式:由 mysqli_query()、mysqli_store_result()、 mysqli_use_result()、mysqli_stmt_get_result() 返回...
mysqli_fetch_field_direct() 函数从结果集中取得某个单一字段(列)的 meta-data,并作为对象返回。语法mysqli_fetch_field_direct(result,fieldnr); 参数描述 result 必需。规定由 mysqli_query()、mysqli_store_result() 或 mysqli_use_result() 返回的结果集标识符。 fieldnr 必需。规定字段号。必须介于 0...
fetch_field_direct() / mysqli_fetch_field_direct() 函数从结果集中取得某个单一字段(列)的 meta-data,并作为对象返回。语法面向对象的风格:$mysqli_result -> fetch_field_direct(fieldnr) 程序风格:mysqli_fetch_field_direct(result, fieldnr)
mysqli_fetch_field_direct() 函数从结果集中取得某个单一字段(列)的 meta-data,并作为对象返回。 语法 mysqli_fetch_field_direct(result,fieldnr); 参数描述 result必需。规定由 mysqli_query()、mysqli_store_result() 或 mysqli_use_result() 返回的结果集标识符。