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


PHP Doctrine_Query::andWhere方法代碼示例

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


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

示例1: retrieveBackendUuserList

 /**
  * Query for uuser list
  * @param Doctrine_Query $q
  * @return Doctrine_Query
  */
 public function retrieveBackendUuserList(Doctrine_Query $q)
 {
     $rootAlias = $q->getRootAlias();
     $q->leftJoin($rootAlias . '.BalanceUser bu');
     $q->andWhere($rootAlias . '.utype=?', 'uuser');
     $q->andWhere($rootAlias . '.password IS NOT NULL');
     return $q;
 }
開發者ID:rollmax,項目名稱:read2read,代碼行數:13,代碼來源:UserTable.class.php

示例2: addStatutColumnQuery

 protected function addStatutColumnQuery(Doctrine_Query $query, $field, $value)
 {
     if ($value == 0) {
         $query->andWhere($query->getRootAlias() . '.statut <> ?', $value);
     }
     if ($value != 0) {
         $query->andWhere($query->getRootAlias() . '.statut = ?', $value);
     }
 }
開發者ID:TheoJD,項目名稱:portail,代碼行數:9,代碼來源:CharteLocauxFormFilter.class.php

示例3: addRangeQuery

 public function addRangeQuery(Doctrine_Query $query, $field, $values)
 {
     $fieldName = $this->getFieldName($field);
     if ($values['from']) {
         $query->andWhere(sprintf('%s.%s >= ?', $query->getRootAlias(), $fieldName), $values['from']);
     }
     if ($values['to']) {
         $query->andWhere(sprintf('%s.%s <= ?', $query->getRootAlias(), $fieldName), $values['to']);
     }
 }
開發者ID:rbolliger,項目名稱:otokou,代碼行數:10,代碼來源:ChargeFormFilter.class.php

示例4: addScheduledTimeColumnQuery

 protected function addScheduledTimeColumnQuery(Doctrine_Query $query, $field, $values)
 {
     switch ($values) {
         case 'from_now':
             $query->andWhere('r.scheduled_time >= ?', date('Y-m-d'));
             break;
         case 'all':
             break;
         default:
             $values = str_replace('.', '-', $values);
             $day_start = date('Y-m-d', strtotime($values));
             $day_end = date('Y-m-d 23:59', strtotime($values) + 24 * 60 * 60);
             $query->andWhere("r.scheduled_time >= ? AND r.scheduled_time <= ?", array($day_start, $day_end));
             break;
     }
 }
開發者ID:vcgato29,項目名稱:poff,代碼行數:16,代碼來源:eventsScheduleFilterForm.class.php

示例5: addClassificationColumnQuery

 public function addClassificationColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if ($values != "") {
         $query->andWhere(" classification = ? ", $values);
     }
     return $query;
 }
開發者ID:naturalsciences,項目名稱:Darwin,代碼行數:7,代碼來源:MineralogyFormFilter.class.php

示例6: _setProgramFilterCallback

 public function _setProgramFilterCallback(Doctrine_Query $query, $value)
 {
     if (!empty($value)) {
         $query->andWhere('pI.program_id = ?', $value);
     }
     return $query;
 }
開發者ID:prosalov,項目名稱:zf1-code-example,代碼行數:7,代碼來源:PerformanceIndicators.php

示例7: addSymplistIndexColumnQuery

 public function addSymplistIndexColumnQuery(Doctrine_Query $query, $field, $value)
 {
     if ($value) {
         $query->andWhere('symplist_index IS NOT NULL');
     }
     return $query;
 }
開發者ID:bshaffer,項目名稱:Symplist,代碼行數:7,代碼來源:SymfonyPluginFormFilter.class.php

示例8: buildQuery

 function buildQuery(Doctrine_Query $query)
 {
     if ($this->getValue('name')) {
         $query->andWhere('name LIKE ?', '%' . $this->getValue('name') . '%');
     }
     return $query;
 }
開發者ID:vjousse,項目名稱:sfDoctrineAssetsLibraryPlugin,代碼行數:7,代碼來源:BasesfAssetsFolderDatagrid.class.php

示例9: applyQueryToDoctrineQuery

 /**
  * Apply user restriction to doctrine query
  * @param Doctrine_Query $query
  */
 private function applyQueryToDoctrineQuery(Doctrine_Query $query)
 {
     if ($this->getQuery()) {
         $queryVal = '%' . $this->getQuery() . '%';
         $queryParams = array($queryVal, $queryVal, $queryVal, $queryVal);
         $query->andWhere('(user_name LIKE ? OR user_firstname LIKE ?' . ' OR user_lastname LIKE ? OR user_email LIKE ?)', $queryParams);
     }
 }
開發者ID:philippjenni,項目名稱:icinga-web,代碼行數:12,代碼來源:UserAdminModel.class.php

示例10: applyQueryToDoctrineQuery

 private function applyQueryToDoctrineQuery(Doctrine_Query $query)
 {
     if ($this->getQuery()) {
         $searchQuery = '%' . $this->getQuery() . '%';
         $searchParams = array($searchQuery, $searchQuery);
         $query->andWhere('(role_name LIKE ? OR role_description LIKE ?)', $searchParams);
     }
 }
開發者ID:philippjenni,項目名稱:icinga-web,代碼行數:8,代碼來源:RoleAdminModel.class.php

示例11: addIgNumColumnQuery

 public function addIgNumColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if ($values != "") {
         $conn_MGR = Doctrine_Manager::connection();
         $query->andWhere("ig_num_indexed like concat(fullToIndex(" . $conn_MGR->quote($values, 'string') . "), '%') ");
     }
     return $query;
 }
開發者ID:naturalsciences,項目名稱:Darwin,代碼行數:8,代碼來源:IgsFormFilter.class.php

示例12: filterScope

 public function filterScope(Doctrine_Query $query, sfUser $user)
 {
     //@todo: fix this shit!!!!!
     //this is very ugly
     $eventFilter = Doctrine_Query::create()->from('FishEvent fe')->select('fe.id')->where("fe.location_id in (" . Doctrine::getTable('Location')->getVisibleLocationsQuery($user, "lc1")->select('lc1.id') . ")");
     $profitFilter = Doctrine_Query::create()->from('Profit pr')->select('pr.id')->where("pr.location_id in (" . Doctrine::getTable('Location')->getVisibleLocationsQuery($user, "lc2")->select('lc2.id') . ")");
     return $query->andWhere("c.location_id in (" . Doctrine::getTable('Location')->getVisibleLocationsQuery($user, "lc3")->select('lc3.id') . ") or c.location_id is null")->andWhere("c.profit_id in ({$profitFilter}) or c.profit_id is null")->andWhere("c.fish_event_id in ({$eventFilter}) or c.fish_event_id is null");
 }
開發者ID:limitium,項目名稱:uberlov,代碼行數:8,代碼來源:CommentTable.class.php

示例13: addCallerIdColumnQuery

 public function addCallerIdColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if ($values != "") {
         $alias = $query->getRootAlias();
         $query->andWhere($alias . '.id != ?', $values);
     }
     return $query;
 }
開發者ID:naturalsciences,項目名稱:Darwin,代碼行數:8,代碼來源:SpecimensSelfFormFilter.class.php

示例14: retrieveAdminChargeList

 public function retrieveAdminChargeList(Doctrine_Query $q)
 {
     $rootAlias = $q->getRootAlias();
     $q->leftJoin($rootAlias . '.Category ct');
     $q->leftJoin($rootAlias . '.Vehicle v');
     $q->andWhere('v.is_archived = ?', false);
     return $q;
 }
開發者ID:rbolliger,項目名稱:otokou,代碼行數:8,代碼來源:ChargeTable.class.php

示例15: addVisiteurIdColumnQuery

 public function addVisiteurIdColumnQuery(Doctrine_Query $query, $field, $value)
 {
     //Pour le xxxx tu peux utiliser $query->getRootAlias() pour récupérer l'alias racine de ta requete
     if ($value['text']) {
         $query->leftjoin($query->getRootAlias() . ".Visiteur v");
         $query->andWhere('v.pseudo_son like ?', "%" . $value['text'] . "%");
     }
 }
開發者ID:pmoutet,項目名稱:navinum,代碼行數:8,代碼來源:VisiteFormFilter.class.php


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