略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: ifx_num_fields

2024-12-23

ifx_num_fields

(PHP 4, PHP 5 < 5.2.1)

ifx_num_fieldsReturns the number of columns in the query

说明

ifx_num_fields ( resource $result_id ) : int

After preparing or executing a query, this call gives you the number of columns in the query.

参数

result_id

result_id is a valid resultid returned by ifx_query() or ifx_prepare() (select type queries only!).

返回值

Returns the number of columns in query for result_id, or FALSE on errors.

范例

Example #1 ifx_num_fields() Example

<?php
$conn_id 
ifx_connect("db""user""password");
$res_id ifx_query("select * from systables"$conn_id);
echo 
ifx_num_fields($res_id);
?>

参见

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.ifx-num-fields.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3