Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - 编程 » SQL Anywhere 数据访问 API » SQL Anywhere PHP API » SQL Anywhere PHP API 参考 » 不建议使用 PHP 函数

 

sqlanywhere_num_rows(不建议使用)

原型
int sqlanywhere_num_rows( resource result_identifier )
说明

不建议使用此函数。应该改用以下 PHP 函数: sasql_num_rows.

返回 result_identifier 包含的行数。

参数

result_identifier   由 sqlanywhere_query 函数返回的结果资源。

返回值

一个正数(如果行数是确切值),或一个负数(如果行数是估计值)。要获取确切的行数,必须针对数据库永久设置或针对连接临时设置数据库选项 row_counts。请参见sasql_set_option

示例

本示例说明如何检索结果集中返回的估计行数。

$num_rows = sqlanywhere_num_rows( $result );
   if( $num_rows < 0 ) {
       $num_rows = abs( $num_rows );    # take the absolute value as an estimate
   }
相关函数