<?php
$resDb = mssql_connect('localhost', 'user', 'name');
$result = mssql_query('SELECT * FROM MYTABLE', $resDb, 10000);
$intNumRows = mssql_num_rows($result);
while ($intNumRows > 0) {
while ($arrRow = mssql_fetch_assoc($result)) {
// Do stuff ...
}
$intNumRows = mssql_fetch_batch($result);
}
?>