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 cubrid 函数 return the number of columns in the result setphp ibm db2 函数 returns a result set listing the columns and associated privileges for a tablephp ibm db2 函数 returns the maximum number of bytes required to display a columnphp ibm db2 函数 returns the number of rows affected by an sql statementphp 函数处理 函数 returns the number of arguments passed to the functionphp informix 函数 get number of rows affected by a queryphp informix 函数 get the contents of sqlca.sqlerrd 0..5 after a queryphp informix 函数 returns the number of columns in the queryphp maxdb 函数 returns the number of columns for the most recent queryphp 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 qc 函数 returns a normalized query trace log for each query inspected by the query cachephp paradox 函数 returns number of fields in a databasephp paradox 函数 returns number of records in a databasephp session pgsql 函数 returns number of errors and last error messagephp sqlite 函数 executes a query and returns either an array for one single column or the value of the first rowphp sqlsrv 函数 returns the number of rows modified by the last insert update or delete query executedphp sybase 函数 gets number of affected rows in last queryphp mysqli returns the number of columns for the most recent queryphp mysqlnduhconnection returns the number of columns for the most recent query
关注编程学问公众号