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 imap 函数 returns a properly formatted email address given the mailbox host and personal infophp maxdb 函数 returns the next field in the result setphp maxdb 函数 returns the number of columns for the most recent queryphp maxdb 函数 returns the thread id for the current connectionphp 多字节字符串 函数 returns start point for next regular expression matchphp 函数 returns the relaxed extended json representation of a bson valuephp mssql 函数 returns an associative array of the current row in the resultphp mssql 函数 returns the next batch of recordsphp mssql 函数 get row as enumerated arrayphp 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 yp/nis 函数 returns the next key value pair in the named mapphp sdo das relational 函数 executes a given sql query against a relational database and returns the results as a normalised data graph
关注编程学问公众号