note 98510 added to function.mssql-fetch-batch
| From: | DavidN dot at osu1 dot php dot net | Date: | Sat, 19 Jun 2010 14:19:16 +0000 |
| Subject: | note 98510 added to function.mssql-fetch-batch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170288@lists.php.net to get a copy of this message | ||
That is not a good example.
Correct usage:
<?php
$mslink=mssql_connect("hostname", "username", "password");
$msresult=mssql_query("SELECT * FROM ORDERS", $mslink, 100);
$numrows= mssql_num_rows($msresult);
unset($msrow);
while ($numrows>0) {
while($msrow=mssql_fetch_row($msresult)) {
//do something
}
$numrows=mssql_fetch_batch($msresult);
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 68.203.210.62
----
Manual Page -- http://www.php.net/manual/en/function.mssql-fetch-batch.php
Edit -- https://master.php.net/note/edit/98510
Del: integrated -- https://master.php.net/note/delete/98510/integrated
Del: useless -- https://master.php.net/note/delete/98510/useless
Del: bad code -- https://master.php.net/note/delete/98510/bad+code
Del: spam -- https://master.php.net/note/delete/98510/spam
Del: non-english -- https://master.php.net/note/delete/98510/non-english
Del: in docs -- https://master.php.net/note/delete/98510/in+docs
Del: other reasons-- https://master.php.net/note/delete/98510
Reject -- https://master.php.net/note/reject/98510
Search -- https://master.php.net/manage/user-notes.php