Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
int sqlanywhere_num_rows( resource result_identifier )
不建议使用此函数。应改用 sasql_num_rows 函数。请参见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 }