当前位置: 首页>>代码示例>>PHP>>正文


PHP Info::NfoQueryString方法代码示例

本文整理汇总了PHP中Info::NfoQueryString方法的典型用法代码示例。如果您正苦于以下问题:PHP Info::NfoQueryString方法的具体用法?PHP Info::NfoQueryString怎么用?PHP Info::NfoQueryString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Info的用法示例。


在下文中一共展示了Info::NfoQueryString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkProcessNfo

 /**
  * Check if we should process NFO's.
  * @return bool
  */
 private function checkProcessNfo()
 {
     if ($this->pdo->getSetting('lookupnfo') == 1) {
         $this->nfoQueryString = \Info::NfoQueryString($this->pdo);
         return $this->pdo->queryOneRow(sprintf('SELECT r.id FROM releases r WHERE 1=1 %s LIMIT 1', $this->nfoQueryString)) === false ? false : true;
     }
     return false;
 }
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:12,代码来源:Forking.php

示例2: proc_query

 public function proc_query($qry, $bookreqids, $request_hours, $db_name)
 {
     switch ((int) $qry) {
         case 1:
             return sprintf("SELECT\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND categoryid BETWEEN 5000 AND 5999 AND rageid = -1) AS processtvrage,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND categoryid = 5070 AND anidbid IS NULL) AS processanime,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND categoryid BETWEEN 2000 AND 2999 AND imdbid IS NULL) AS processmovies,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND categoryid IN (3010, 3040, 3050) AND musicinfoid IS NULL) AS processmusic,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND categoryid BETWEEN 1000 AND 1999 AND consoleinfoid IS NULL) AS processconsole,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND categoryid IN (%s) AND bookinfoid IS NULL) AS processbooks,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND categoryid = 4050 AND gamesinfo_id = 0) AS processgames,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND categoryid BETWEEN 6000 AND 6040 AND xxxinfo_id = 0) AS processxxx,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases r WHERE 1=1 %s) AS processnfo", $bookreqids, \Info::NfoQueryString($this->pdo));
         case 2:
             return "SELECT\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND nfostatus = 1) AS nfo,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases r\n\t\t\t\t\t\tINNER JOIN category c ON c.id = r.categoryid\n\t\t\t\t\t\tWHERE r.nzbstatus = 1\n\t\t\t\t\t\tAND r.passwordstatus BETWEEN -6 AND -1 AND r.haspreview = -1 AND c.disablepreview = 0\n\t\t\t\t\t) AS work,\n\t\t\t\t\t(SELECT COUNT(*) FROM groups WHERE active = 1) AS active_groups,\n\t\t\t\t\t(SELECT COUNT(*) FROM groups WHERE name IS NOT NULL) AS all_groups";
         case 3:
             return sprintf("SELECT\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND isrequestid = 1 AND prehashid = 0 AND reqidstatus = 0) +\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE nzbstatus = 1 AND isrequestid = 1 AND prehashid = 0 AND reqidstatus = -1) +\n\t\t\t\t\t(SELECT COUNT(*) FROM releases\n\t\t\t\t\t\tWHERE nzbstatus = 1\n\t\t\t\t\t\tAND isrequestid = 1 AND prehashid = 0 AND reqidstatus = -3 AND adddate > NOW() - INTERVAL %s HOUR\n\t\t\t\t\t) AS requestid_inprogress,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE prehashid > 0 AND nzbstatus = 1 AND isrequestid = 1 AND reqidstatus = 1) AS requestid_matched,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE prehashid > 0 AND searchname IS NOT NULL) AS prehash_matched,\n\t\t\t\t\t(SELECT COUNT(*) FROM releases WHERE preid > 0 AND searchname IS NOT NULL) AS predb_matched,\n\t\t\t\t\t(SELECT COUNT(DISTINCT(preid)) FROM releases WHERE preid > 0 AND searchname IS NOT NULL) AS distinct_predb_matched,\n\t\t\t\t\t(SELECT COUNT(DISTINCT(prehashid)) FROM releases WHERE prehashid > 0 AND searchname IS NOT NULL) AS distinct_prehash_matched", $request_hours);
         case 4:
             return sprintf("\n\t\t\t\t\tSELECT\n\t\t\t\t\t(SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'predb' AND TABLE_SCHEMA = %1\$s) AS predb,\n\t\t\t\t\t(SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'prehash' AND TABLE_SCHEMA = %1\$s) AS prehash,\n\t\t\t\t\t(SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'partrepair' AND TABLE_SCHEMA = %1\$s) AS partrepair_table,\n\t\t\t\t\t(SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'parts' AND TABLE_SCHEMA = %1\$s) AS parts_table,\n\t\t\t\t\t(SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'binaries' AND TABLE_SCHEMA = %1\$s) AS binaries_table,\n\t\t\t\t\t(SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'releases' AND TABLE_SCHEMA = %1\$s) AS releases,\n\t\t\t\t\t(SELECT COUNT(*) FROM groups WHERE first_record IS NOT NULL AND backfill = 1\n\t\t\t\t\t\tAND (now() - INTERVAL backfill_target DAY) < first_record_postdate\n\t\t\t\t\t) AS backfill_groups_days,\n\t\t\t\t\t(SELECT COUNT(*) FROM groups WHERE first_record IS NOT NULL AND backfill = 1 AND (now() - INTERVAL datediff(curdate(),\n\t\t\t\t\t(SELECT VALUE FROM settings WHERE setting = 'safebackfilldate')) DAY) < first_record_postdate) AS backfill_groups_date", $this->pdo->escapeString($db_name));
         case 6:
             return "SELECT\n\t\t\t\t\t(SELECT searchname FROM releases ORDER BY id DESC LIMIT 1) AS newestrelname,\n\t\t\t\t\t(SELECT UNIX_TIMESTAMP(MAX(predate)) FROM prehash) AS newestprehash,\n\t\t\t\t\t(SELECT UNIX_TIMESTAMP(MAX(ctime)) FROM predb) AS newestpredb,\n\t\t\t\t\t(SELECT UNIX_TIMESTAMP(adddate) FROM releases ORDER BY id DESC LIMIT 1) AS newestrelease";
         default:
             return false;
     }
 }
开发者ID:engine9-,项目名称:newznab-tmux,代码行数:17,代码来源:Tmux.php


注:本文中的Info::NfoQueryString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。