當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Contest::getStateConditions方法代碼示例

本文整理匯總了PHP中Contest::getStateConditions方法的典型用法代碼示例。如果您正苦於以下問題:PHP Contest::getStateConditions方法的具體用法?PHP Contest::getStateConditions怎麽用?PHP Contest::getStateConditions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Contest的用法示例。


在下文中一共展示了Contest::getStateConditions方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: readObjects

 /**
  * @see DatabaseObjectList::readObjects()
  */
 public function readObjects()
 {
     $sql = "SELECT\t\t" . (!empty($this->sqlSelects) ? $this->sqlSelects . ',' : '') . "\n\t\t\t\t\tuser_table.username, contest.*\n\t\t\tFROM\t\twcf" . WCF_N . "_contest contest\n\t\t\tLEFT JOIN\twcf" . WCF_N . "_user user_table\n\t\t\tON\t\t(user_table.userID = contest.userID)\n\t\t\t" . $this->sqlJoins . "\n\t\t\t" . (!empty($this->sqlConditions) ? "WHERE (" . $this->sqlConditions . ")" : '') . "\n\t\t\tAND (" . Contest::getStateConditions() . ")\n\t\t\t" . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
     $result = WCF::getDB()->sendQuery($sql, $this->sqlLimit, $this->sqlOffset);
     while ($row = WCF::getDB()->fetchArray($result)) {
         $this->entries[] = new ContestFeedEntry(null, $row);
     }
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:11,代碼來源:ContestFeedEntryList.class.php

示例2: __construct

 /**
  * Creates a new ViewableContest object.
  *
  * @param	integer		$contestID
  * @param 	array<mixed>	$row
  */
 public function __construct($contestID, $row = null)
 {
     if ($contestID !== null) {
         $sql = "SELECT\t\tavatar_table.*,  \n\t\t\t\t\t\tcontest.*,\n\t\t\t\t\t\tuser_table.username, \n\t\t\t\t\t\tgroup_table.groupName\n\t\t\t\tFROM \t\twcf" . WCF_N . "_contest contest\n\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_user user_table\n\t\t\t\tON\t\t(user_table.userID = contest.userID)\n\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_group group_table\n\t\t\t\tON\t\t(group_table.groupID = contest.groupID)\n\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_avatar avatar_table\n\t\t\t\tON\t\t(avatar_table.avatarID = user_table.avatarID)\n\t\t\t\tWHERE \t\tcontest.contestID = " . intval($contestID) . "\n\t\t\t\tAND\t\t(" . Contest::getStateConditions() . ")";
         $row = WCF::getDB()->getFirstRow($sql);
     }
     DatabaseObject::__construct($row);
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:14,代碼來源:ViewableContest.class.php

示例3: readObjects

 /**
  * @see DatabaseObjectList::readObjects()
  */
 public function readObjects()
 {
     $sql = "SELECT\t\t" . (!empty($this->sqlSelects) ? $this->sqlSelects . ',' : '') . "\n\t\t\t\t\tcontest.*\n\t\t\tFROM\t\twcf" . WCF_N . "_contest contest\n\t\t\t" . $this->sqlJoins . "\n\n\t\t\tWHERE\t\t(" . Contest::getStateConditions() . ")\n\t\t\t" . (!empty($this->sqlConditions) ? "AND " . $this->sqlConditions : '') . "\n\t\t\t" . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
     $result = WCF::getDB()->sendQuery($sql, $this->sqlLimit, $this->sqlOffset);
     while ($row = WCF::getDB()->fetchArray($result)) {
         $this->entries[] = new Contest(null, $row);
     }
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:11,代碼來源:ContestList.class.php

示例4: readObjectIDArray

 /**
  * Gets the object ids.
  */
 protected function readObjectIDArray()
 {
     $sql = "SELECT\t\tcontest.contestID, contest.attachments\n\t\t\tFROM\t\twcf" . WCF_N . "_contest contest\n\t\t\t\t" . $this->sqlJoins . "\n\t\t\tWHERE (" . Contest::getStateConditions() . ")\n\t\t\t" . (!empty($this->sqlConditions) ? "AND (" . $this->sqlConditions . ")" : '') . "\n\t\t\t" . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
     $result = WCF::getDB()->sendQuery($sql, $this->sqlLimit, $this->sqlOffset);
     while ($row = WCF::getDB()->fetchArray($result)) {
         $this->objectIDArray[] = $row['contestID'];
         if ($row['attachments']) {
             $this->attachmentEntryIDArray[] = $row['contestID'];
         }
     }
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:14,代碼來源:ViewableContestList.class.php

示例5: readObjectIDArray

 /**
  * Gets the object ids.
  */
 protected function readObjectIDArray()
 {
     $sql = "SELECT\t\tcontest.contestID, contest.attachments\n\t\t\tFROM\t\twcf" . WCF_N . "_tag_to_object tag_to_object,\n\t\t\t\t\twcf" . WCF_N . "_contest contest\n\t\t\tWHERE\t\ttag_to_object.tagID = " . intval($this->tagID) . "\n\t\t\t\t\tAND tag_to_object.taggableID = " . $this->taggable->getTaggableID() . "\n\t\t\t\t\tAND contest.contestID = tag_to_object.objectID\n\t\t\t\t\t" . (!empty($this->sqlConditions) ? "AND " . $this->sqlConditions : '') . "\n\t\t\t\t\tAND (" . Contest::getStateConditions() . ")\n\t\t\t" . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
     $result = WCF::getDB()->sendQuery($sql, $this->sqlLimit, $this->sqlOffset);
     while ($row = WCF::getDB()->fetchArray($result)) {
         $this->objectIDArray[] = $row['contestID'];
         if ($row['attachments']) {
             $this->attachmentEntryIDArray[] = $row['contestID'];
         }
     }
 }
開發者ID:CaribeSoy,項目名稱:contest-wcf,代碼行數:14,代碼來源:TaggedContestList.class.php


注:本文中的Contest::getStateConditions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。