mssql_fetch_batch

(PHP 4 >= 4.0.4, PHP 5, PECL odbtp >= 1.1.1)

mssql_fetch_batchReturns the next batch of records

Warning

This function was REMOVED in PHP 7.0.0.

说明

mssql_fetch_batch ( resource $result ) : int

Returns the next batch of records.

参数

result

The result resource that is being evaluated. This result comes from a call to mssql_query().

返回值

Returns the number of rows in the returned batch.

范例

Example #1 mssql_fetch_batch() example

<?php
// Connect to MSSQL and select the database
$link mssql_connect('MANGO\SQLEXPRESS''sa''phpfi');
mssql_select_db('php'$link);

// Send a query
$result mssql_query('SELECT * FROM [php].[dbo].[people]'$link100);
$records 10;

while (
$records >= 0) {
    while (
$row mssql_fetch_assoc($result)) {
        
// Do stuff ...
    
}

    --
$records;
}

if (
$batchsize mssql_fetch_batch($result)) {
    
// $batchsize is the number of records left 
    // in the result, but not shown above
}
?>

相关文章
php evperiodic returns the absolute time that this watcher is supposed to trigger nextphp maxdb 函数 returns the next field in the result setphp 多字节字符串 函数 returns start point for next regular expression matchphp mssql 函数 returns an associative array of the current row in the resultphp mssql 函数 returns the next batch of recordsphp mssql 函数 returns the last message from the serverphp mssql 函数 move the internal result pointer to the next resultphp mssql 函数 returns the number of records affected by the queryphp oci8 函数 returns the next row from a query as an associative or numeric arrayphp oci8 函数 returns the next row from a query as an associative arrayphp oci8 函数 returns the next row from a query as an objectphp oci8 函数 returns the next row from a query as a numeric arrayphp oci8 函数 returns the next child statement resource from a parent statement resource that has oracle database 12c implicit result setsphp paradox 函数 returns number of records in a databasephp sqlite 函数 fetches the next row from a result set as an objectphp sqlsrv 函数 returns error and warning information about the last sqlsrv operation performedphp sqlsrv 函数 returns the number of rows modified by the last insert update or delete query executedphp svn 函数 returns the length of a file from a given version of the fsphp sybase 函数 returns the last message from the serverphp yp/nis 函数 returns the next key value pair in the named map
关注编程学问公众号