コード例 #1
0
ファイル: activity_log_dao.php プロジェクト: vazahat/dudex
 public function deleteCompletedFeatures()
 {
     $perDay = OW::getConfig()->getValue('profileprogressbar', 'per_day');
     $example = new OW_Example();
     $example->andFieldLessOrEqual(self::TIME_STAMP, strtotime("-{$perDay} day"));
     return $this->deleteByExample($example);
 }
コード例 #2
0
ファイル: notify_log_dao.php プロジェクト: hardikamutech/loov
 public function cleareExpiredNotifyLog($timestamp)
 {
     if (empty($timestamp)) {
         return FALSE;
     }
     $example = new OW_Example();
     $example->andFieldLessOrEqual(self::TIMESTAMP, $timestamp);
     return $this->deleteByExample($example);
 }
コード例 #3
0
ファイル: notification_dao.php プロジェクト: vazahat/dudex
 public function findNotificationList($userId, $beforeStamp, $ignoreIds, $count)
 {
     $example = new OW_Example();
     $example->andFieldEqual('userId', $userId);
     $example->andFieldLessOrEqual('timeStamp', $beforeStamp);
     if (!empty($ignoreIds)) {
         $example->andFieldNotInArray('id', $ignoreIds);
     }
     $example->setLimitClause(0, $count);
     $example->setOrder('viewed, timeStamp DESC');
     return $this->findListByExample($example);
 }
コード例 #4
0
 public function findPreviousSection(BOL_QuestionSection $section)
 {
     if ($section === null) {
         return null;
     }
     $example = new OW_Example();
     $example->andFieldLessOrEqual('sortOrder', (int) $section->sortOrder);
     $example->andFieldEqual('isHidden', 0);
     $example->andFieldNotEqual('name', 'about_my_match');
     $example->andFieldNotEqual('name', $section->name);
     $example->setOrder(' sortOrder desc ');
     return $this->findObjectByExample($example);
 }
コード例 #5
0
 public function findListAfterAvatarId($avatarId, $count, $includes = true)
 {
     $avatar = $this->findLastByAvatarId($avatarId);
     if ($avatar === null) {
         return array();
     }
     $example = new OW_Example();
     $example->andFieldEqual("userId", $avatar->userId);
     if ($includes) {
         $example->andFieldLessOrEqual("timeStamp", $avatar->timeStamp);
     } else {
         $example->andFieldLessThan("timeStamp", $avatar->timeStamp);
     }
     $example->setOrder("`timeStamp` DESC");
     $example->setLimitClause(0, $count);
     return $this->findListByExample($example);
 }
コード例 #6
0
ファイル: winks_dao.php プロジェクト: hardikamutech/hammu
 public function findExpiredDate($timestamp)
 {
     $example = new OW_Example();
     $example->andFieldLessOrEqual(self::TIMESTAMP, $timestamp);
     return $this->findListByExample($example);
 }
コード例 #7
0
 /**
  * @param int $startTime
  */
 public function deleteActionSetByTimestamp($timestamp)
 {
     $ex = new OW_Example();
     $ex->andFieldLessOrEqual('timestamp', (int) $timestamp);
     $this->deleteByExample($ex);
 }
コード例 #8
0
 public function deleteExpiredEntities()
 {
     $example = new OW_Example();
     $example->andFieldLessOrEqual(self::EXPIRATION_TS, time());
     $this->deleteByExample($example);
 }
コード例 #9
0
ファイル: email_verify_dao.php プロジェクト: vazahat/dudex
 public function deleteByCreatedStamp($stamp)
 {
     $timeStamp = (int) $stamp;
     $example = new OW_Example();
     $example->andFieldLessOrEqual('createStamp', $timeStamp);
     $this->deleteByExample($example);
 }
コード例 #10
0
 /**
  * Returns post number in the topic
  *
  * @param int $topicId
  * @param int $postId
  * @return int
  */
 public function findPostNumber($topicId, $postId)
 {
     $example = new OW_Example();
     $example->andFieldEqual('topicId', $topicId);
     $example->andFieldLessOrEqual('id', $postId);
     return $this->countByExample($example);
 }
コード例 #11
0
ファイル: invitation_dao.php プロジェクト: vazahat/dudex
 public function findEntityInvitationCount($entityType, $entityId)
 {
     $example = new OW_Example();
     $example->andFieldEqual('entityType', $entityType);
     $example->andFieldLessOrEqual('entityId', $entityId);
     return $this->countByExample($example);
 }