当前位置: 首页>>代码示例>>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;未经允许,请勿转载。