當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。