note 33283 deleted from function.mssql-fetch-batch by didou

From: Date: Sun, 04 Feb 2007 06:11:40 +0000
Subject: note 33283 deleted from function.mssql-fetch-batch by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122804@lists.php.net to get a copy of this message
Note Submitter: cassano at monroe dot net ---- 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); }

« previous php.notes (#122804) next »