IsMaxrowsReached

From PHRETS


Syntax

IsMaxrowsReached ( [ string $pointer_id ] )

Used to determine if the previously requested SearchQuery() has more records than the number returned.


Parameters

$pointer_id
The returned value from SearchQuery(). If not given, defaults to last SearchQuery() call


Return Values

Boolean
Returns TRUE if # of returned records is fewer than total matching query. Returns FALSE otherwise.


Changelog

Version Description
1.0rc2 Made $pointer_id a parameter that can be passed


Examples

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
}


Related to

Views
Personal tools