mssql_fetch_batch

(PHP 4 >= 4.0.4, PHP 5)

mssql_fetch_batch --  Returns the next batch of records

Description

int mssql_fetch_batch ( resource result_index )

Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.



mssql_fetch_batch
cassano at monroe dot net
20-Jun-2003 01:44
int mssql_fetch_batch ( int result)

Returns: The number of rows for this batch

This works with the php.ini option 'mssql.batchsize' to limit the number of rows that are buffered in memory.

i.e.

// Batch 10000 records in the buffer at a time
ini_set('mssql.batchsize', 10000);

$resDb = mssql_connect(...);
$result = mssql_query('SELECT * FROM MYTABLE', $resDb);

$intNumRows = mssql_num_rows($result);

while ($intNumRows > 0)
{
   while ($arrRow = mssql_fetch_assoc($result))
   {
         // Do stuff ...
   }

   $intNumRows = mssql_fetch_batch($result);
}

<mssql_fetch_assocmssql_fetch_field>
 Last updated: Tue, 15 Nov 2005