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 ibm db2 函数 returns the auto generated id of the last insert query that successfully executed on this connectionphp ibm db2 函数 returns a result set listing the unique row identifier columns for a tablephp eio 函数 returns number of not yet handled requestsphp eio 函数 returns number of requests to be processedphp eio 函数 returns number of threads currently in usephp informix 函数 get number of rows affected by a queryphp informix 函数 releases resources for the queryphp informix 函数 returns the number of columns in the queryphp maxdb 函数 returns the number of columns for the most recent queryphp maxdb 函数 returns rpl query typephp maxdb 函数 returns the number of warnings from the last query for the given linkphp msql 函数 returns number of affected rowsphp mssql 函数 returns the number of records affected by the queryphp sqlite 函数 execute a query against a given database and returns an arrayphp sqlite 函数 executes a query against a given database and returns a result handlephp sqlsrv 函数 returns the number of rows modified by the last insert update or delete query executedphp mysqli returns the number of columns for the most recent queryphp mysqli returns the number of warnings from the last query for the given linkphp mysqlnduhconnection returns the number of columns for the most recent queryphp sdo das relational 函数 executes a given sql query against a relational database and returns the results as a normalised data graph
关注编程学问公众号