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