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);
?>

参见

相关文章
php informix 函数 get number of rows affected by a queryphp informix 函数 returns the number of columns in the queryphp informix 函数 count the rows already fetched from a queryphp ingres 函数 get the number of fields returned by the last queryphp maxdb 函数 returns the number of columns for the most recent queryphp maxdb 函数 returns the number of parameter for the given statementphp maxdb 函数 returns the number of warnings from the last query for the given linkphp mssql 函数 returns the number of records affected by the queryphp mysqlnd ms 函数 returns query distribution and connection statisticsphp oci8 函数 returns the next row from a query as an associative or numeric arrayphp postgresql 函数 returns the type id oid for the corresponding field numberphp sqlsrv 函数 returns the number of rows modified by the last insert update or delete query executedphp tidy 函数 returns the number of tidy accessibility warnings encountered for specified documentphp tidy 函数 returns the number of tidy configuration errors encountered for specified documentphp tidy 函数 returns the number of tidy errors encountered for specified documentphp mysqli returns the number of columns for the most recent queryphp mysqlnduhconnection returns the number of columns for the most recent queryphp mysqlnduhconnection returns the number of warnings from the last query for the given linkphp solrquery returns the maximum number of query terms that will be included in any generated queryphp sqlite3result returns the number of columns in the result set
关注编程学问公众号