note 109696 added to function.mssql-fetch-batch
| From: | doug dot pe at gmail dot com | Date: | Fri, 10 Aug 2012 17:22:14 +0000 |
| Subject: | note 109696 added to function.mssql-fetch-batch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-190032@lists.php.net to get a copy of this message | ||
This demonstrates the return value:
<?php
$connect = mssql_connect("databasename", "username", "password");
$sql = "SELECT * FROM huge_table"; // returns 3271 rows, for example
$qry = mssql_query($SQL, $connect, 1000); // 1000 Rows batchsize
$batchsize = mssql_num_rows($qry);
print "$batchsize <br />\r\n";
do {
$batchsize = mssql_fetch_batch($qry);
print "$batchsize <br />\r\n";
} while ($batchsize); // get the next batch until end
?>
returns:
1000
1000
1000
271
0
----
Server IP: 69.147.83.197
Probable Submitter: 164.110.164.237
----
Manual Page -- http://www.php.net/manual/en/function.mssql-fetch-batch.php
Edit -- https://master.php.net/note/edit/109696
Del: integrated -- https://master.php.net/note/delete/109696/integrated
Del: useless -- https://master.php.net/note/delete/109696/useless
Del: bad code -- https://master.php.net/note/delete/109696/bad+code
Del: spam -- https://master.php.net/note/delete/109696/spam
Del: non-english -- https://master.php.net/note/delete/109696/non-english
Del: in docs -- https://master.php.net/note/delete/109696/in+docs
Del: other reasons-- https://master.php.net/note/delete/109696
Reject -- https://master.php.net/note/reject/109696
Search -- https://master.php.net/manage/user-notes.php