本文整理匯總了PHP中nzedb\db\Settings::get_Found_Rows方法的典型用法代碼示例。如果您正苦於以下問題:PHP Settings::get_Found_Rows方法的具體用法?PHP Settings::get_Found_Rows怎麽用?PHP Settings::get_Found_Rows使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nzedb\db\Settings
的用法示例。
在下文中一共展示了Settings::get_Found_Rows方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: searchbyImdbId
/**
* @param int $imDbId
* @param int $offset
* @param int $limit
* @param string $name
* @param array $cat
* @param int $maxAge
*
* @return array
*/
public function searchbyImdbId($imDbId, $offset = 0, $limit = 100, $name = '', $cat = [-1], $maxAge = -1)
{
$baseSql = sprintf("%s\n\t\t\tWHERE r.categoryid BETWEEN 2000 AND 2999\n\t\t\tAND nzbstatus = 1\n\t\t\tAND r.passwordstatus <= %d\n\t\t\t%s %s %s %s", $name !== '' ? $this->releaseSearch->getFullTextJoinString() : '', $this->showPasswords(), $name !== '' ? $this->releaseSearch->getSearchSQL(['searchname' => $name]) : '', $imDbId != '-1' && is_numeric($imDbId) ? sprintf(' AND imdbid = %d ', str_pad($imDbId, 7, '0', STR_PAD_LEFT)) : '', $this->categorySQL($cat), $maxAge > 0 ? sprintf(' AND r.postdate > NOW() - INTERVAL %d DAY ', $maxAge) : '');
$sql = sprintf("SELECT SQL_CALC_FOUND_ROWS r.*,\n\t\t\t\tconcat(cp.title, ' > ', c.title) AS category_name,\n\t\t\t\tCONCAT(cp.id, ',', c.id) AS category_ids,\n\t\t\t\tg.name AS group_name,\n\t\t\t\trn.id AS nfoid\n\t\t\tFROM releases r\n\t\t\tINNER JOIN groups g ON g.id = r.group_id\n\t\t\tINNER JOIN category c ON c.id = r.categoryid\n\t\t\tLEFT OUTER JOIN releasenfo rn ON rn.releaseid = r.id AND rn.nfo IS NOT NULL\n\t\t\tINNER JOIN category cp ON cp.id = c.parentid\n\t\t\t%s\n\t\t\tORDER BY postdate DESC\n\t\t\tLIMIT %d OFFSET %d", $baseSql, $limit, $offset);
$releases = $this->pdo->query($sql);
$releases[0]['_totalrows'] = $this->pdo->get_Found_Rows();
return $releases;
}