本文整理匯總了PHP中FeedItem::getFeedItemsQuery方法的典型用法代碼示例。如果您正苦於以下問題:PHP FeedItem::getFeedItemsQuery方法的具體用法?PHP FeedItem::getFeedItemsQuery怎麽用?PHP FeedItem::getFeedItemsQuery使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FeedItem
的用法示例。
在下文中一共展示了FeedItem::getFeedItemsQuery方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getFeedItems
function getFeedItems($searchType, $searchKeyword, $searchExtraValue, $page, $pageCount, $viewDelete = false, $owner = 0, $customQuery = '') {
global $db, $database;
$sQuery = FeedItem::getFeedItemsQuery($searchType, $searchKeyword, $searchExtraValue,$viewDelete,$owner) . $customQuery;
// for customQuery
if(strpos($customQuery,'f.') !== false && strpos($sQuery, 'Feeds f') === false ) {
$sQuery = ' LEFT JOIN '.$database['prefix'].'Feeds f ON (f.id = i.feed) ' . $sQuery;
}
$pageStart = ($page-1) * $pageCount; // 처음페이지 번호
$sQuery = ' LEFT JOIN '.$database['prefix'].'CategoryRelations c ON (c.item = i.id) ' . $sQuery;
$feedList = $db->queryAll('SELECT i.id, i.feed, i.author, i.permalink, i.title, i.description, i.tags, i.written, i.click, i.thumbnailId, i.visibility, i.feedVisibility, i.boomUp, i.boomDown, c.category AS category, i.focus FROM '.$database['prefix'].'FeedItems i '.$sQuery.' GROUP BY i.id ORDER BY i.written DESC LIMIT '.$pageStart.','.$pageCount);
$feedItemCount = FeedItem::getFeedItemCount($sQuery);
return array($feedList, $feedItemCount);
}