-
Notifications
You must be signed in to change notification settings - Fork 237
IsMaxrowsReached
Troy Davisson edited this page Mar 5, 2016
·
2 revisions
Note: This page documents capabilities available in the older 1.x version. Please see this repository's README file for the new 2.x version documentation.
IsMaxrowsReached ( [ string $pointer_id ] )
Used to determine if the previously requested SearchQuery() has more records than the number returned.
$pointer_id
- The returned value from SearchQuery(). If not given, defaults to last SearchQuery() pointer
Boolean
Returns TRUE if # of returned records is fewer than total matching query. Returns FALSE otherwise.
1.0rc2 - Made $pointer_id a parameter that can be passed
<?php
if ($rets->IsMaxrowsReached()) {
// server has more records than just returned.
// if server supports Offset, you can move to the next "page" of results.
// for example, if previous search only returned 100 with no Offset,
// do Search again but with Offset=101 to get the next 100 records.
// if IsMaxrowsReached is true again,
// do Search again but with Offset=201 to get next 100, etc. until
// IsMaxrowsReached() is false.
// include check to catch infinite loop if server doesn't support Offset
// since IsMaxrowsReached will always be true and you're redownloading
// the same records over and over and over
}
else {
// last query returned everything so continue on
}