Forum und email

mssql_fetch_batch

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

mssql_fetch_batch — レコードの次のバッチを返す

説明

int mssql_fetch_batch ( resource $result )

レコードの次のバッチを返します。

パラメータ

result

処理対象となる結果リソース。これは mssql_query() のコールによって取得します。

返り値

バッチ番号を整数値で返します。

Example#1 mssql_fetch_batch() の例

<?php
$resDb 
mssql_connect('localhost''user''name');
$result mssql_query('SELECT * FROM MYTABLE'$resDb10000);

$intNumRows mssql_num_rows($result);

while (
$intNumRows 0) {
    while (
$arrRow mssql_fetch_assoc($result)) {
        
// 何らかの処理 ...
    
}
    
$intNumRows mssql_fetch_batch($result);
}
?>