当前位置: 首页>>代码示例>>PHP>>正文


PHP DBField::addToQuery方法代码示例

本文整理汇总了PHP中DBField::addToQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP DBField::addToQuery方法的具体用法?PHP DBField::addToQuery怎么用?PHP DBField::addToQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DBField的用法示例。


在下文中一共展示了DBField::addToQuery方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addToQuery

 /**
  * 
  * @param SQLQuery $query
  */
 function addToQuery(&$query)
 {
     parent::addToQuery($query);
     $query->selectField("AsText({$this->name})", "{$this->name}");
     // $query->addSelect("AsText({$this->name}) AS {$this->name}_AsText");
     // $query->select[] = "AsText({$this->name}) AS {$this->name}_AsText";
 }
开发者ID:helpfulrobot,项目名称:silverstripe-solr,代码行数:11,代码来源:SolrGeoDBField.php

示例2: addToQuery

 public function addToQuery(&$query)
 {
     parent::addToQuery($query);
     $fields = $this->compositeDatabaseFields();
     foreach ($fields as $name => $type) {
         $query->selectField($this->name . $name);
     }
 }
开发者ID:spekulatius,项目名称:ss-focus-area,代码行数:8,代码来源:DBField.php

示例3: addToQuery

 public function addToQuery(&$query)
 {
     parent::addToQuery($query);
     $query->selectField(sprintf('"%sPostcode"', $this->name));
     $query->selectField(sprintf('"%sCountry"', $this->name));
     $query->selectField(sprintf('"%sLatitude"', $this->name));
     $query->selectField(sprintf('"%sLongditude"', $this->name));
 }
开发者ID:andrelohmann,项目名称:silverstripe-geolocation,代码行数:8,代码来源:PostCodeLocation.php

示例4: addToQuery

 /**
  * Add all columns which are defined through {@link requireField()}
  * and {@link $composite_db}, or any additional SQL that is required
  * to get to these columns. Will mostly just write to the {@link SQLSelect->select}
  * array.
  *
  * @param SQLSelect $query
  */
 public function addToQuery(&$query)
 {
     parent::addToQuery($query);
     foreach ($this->compositeDatabaseFields() as $field => $spec) {
         $table = $this->getTable();
         $key = $this->getName() . $field;
         if ($table) {
             $query->selectField("\"{$table}\".\"{$key}\"");
         } else {
             $query->selectField("\"{$key}\"");
         }
     }
 }
开发者ID:vinstah,项目名称:silverstripe-framework,代码行数:21,代码来源:CompositeDBField.php

示例5: addToQuery

 public function addToQuery(&$query)
 {
     parent::addToQuery($query);
     $query->selectField(sprintf('"%sAmount"', $this->name));
     $query->selectField(sprintf('"%sCurrency"', $this->name));
 }
开发者ID:jbrown40,项目名称:nvweb,代码行数:6,代码来源:Money.php

示例6: addToQuery

 /**
  * Add all columns which are defined through {@link requireField()}
  * and {@link $composite_db}, or any additional SQL that is required
  * to get to these columns. Will mostly just write to the {@link SQLQuery->select}
  * array.
  * 
  * @param SQLQuery $query
  */
 public function addToQuery(&$query)
 {
     parent::addToQuery($query);
 }
开发者ID:lrc,项目名称:silverstripe-link-field,代码行数:12,代码来源:LinkField.php

示例7: addToQuery

 function addToQuery(&$query)
 {
     parent::addToQuery($query);
     $name = sprintf('%sValue', $this->name);
     $val = sprintf('"%sValue"', $this->name);
     $select = $query->getSelect();
     if (!isset($select[$name])) {
         $query->addSelect(array($name => $val));
     }
 }
开发者ID:tim-lar,项目名称:silverstripe-multivaluefield,代码行数:10,代码来源:MultiValueField.php

示例8: addToQuery

 function addToQuery(&$query)
 {
     parent::addToQuery($query);
     $query->select[] = "AsText({$this->name}) AS {$this->name}_AsText";
 }
开发者ID:ruffox,项目名称:geo,代码行数:5,代码来源:GeoDBField.php


注:本文中的DBField::addToQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。