public function InstagramFeedsPluginsPager::pageUntilID in Instagram Feeds 7
Determine the last result ID fetched for a given feed nid.
This is used when paging an Instagram feed to determine when to stop paging.
Parameters
string $feed_nid: The feed nid.
Return value
string The GUID of the last item fetched for the feed nid.
1 call to InstagramFeedsPluginsPager::pageUntilID()
- InstagramFeedsPluginsPager::fetch in modules/
instagram_feeds_plugins/ plugins/ feeds/ InstagramFeedsPluginsPager.inc - Implements parent::fetch().
File
- modules/
instagram_feeds_plugins/ plugins/ feeds/ InstagramFeedsPluginsPager.inc, line 151 - Home of the InstagramFeedsPluginsPager.
Class
- InstagramFeedsPluginsPager
- Fetches data via Instagram API with the ability to page all results.
Code
public function pageUntilID($feed_nid) {
return db_select('feeds_item', 'f')
->fields('f', array(
'guid',
))
->condition('f.feed_nid', $feed_nid)
->range(0, 1)
->orderBy('guid', 'DESC')
->execute()
->fetchField();
}