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


PHP Selection::update方法代碼示例

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


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

示例1: update

 public function update($data, $forceRegenerateTimes = FALSE)
 {
     parent::update($data);
     if ($forceRegenerateTimes || rand(0, 100) < 10) {
         $this->generateAllTimes();
     }
 }
開發者ID:soundake,項目名稱:pd,代碼行數:7,代碼來源:EventsTerms.php

示例2: update

 public function update($data)
 {
     $builder = $this->sqlBuilder;
     $this->sqlBuilder = new SqlBuilder($this);
     $this->where($this->column, $this->active);
     $return = parent::update($data);
     $this->sqlBuilder = $builder;
     return $return;
 }
開發者ID:BroukPytlik,項目名稱:agility,代碼行數:9,代碼來源:GroupedSelection.php

示例3: update

 public function update($data)
 {
     $where = $this->where;
     $this->where[0] = "{$this->delimitedColumn} = " . $this->connection->quote($this->active);
     $return = parent::update($data);
     $this->where = $where;
     return $return;
 }
開發者ID:bazo,項目名稱:Tatami,代碼行數:8,代碼來源:GroupedSelection.php

示例4: update

 public function update($data, $checkData = FALSE)
 {
     if ($checkData) {
         $coords = Geolocation::getCoordsFromText($data['map_coords']);
         $data['lat'] = $coords[0];
         $data['lon'] = $coords[1];
         //$to_code = isset($data['locality_nickname']) ? $data['name']." ".$data['locality_nickname']." ".$data['locality_id'] : $data['name']." ".$data['locality_id'];
         //$data['code'] = $data['code'] !=''  ? $data['code']  : \Nette\Utils\Strings::webalize($to_code);
         $data['code'] = $data['code'] != '' ? $data['code'] : \Nette\Utils\Strings::webalize($data['name']);
         if (isset($data['stroller'])) {
             $data['stroller'] = $data['stroller'] == 1 ? 1 : 0;
         }
         if (isset($data['visible'])) {
             $data['visible'] = $data['visible'] == 1 ? 1 : 0;
         }
         if (isset($data['approved'])) {
             $data['approved'] = $data['approved'] == 1 ? 1 : 0;
         }
         if (isset($data['ad_onhomepage'])) {
             $data['ad_onhomepage'] = $data['ad_onhomepage'] == 1 ? 1 : 0;
         }
         if (isset($data['ad'])) {
             $data['ad'] = $data['ad'] == 1 ? 1 : 0;
         }
         if (isset($data['show_in_catalogue'])) {
             $data['show_in_catalogue'] = $data['show_in_catalogue'] == 1 ? 1 : 0;
         }
         if (isset($data['show_in_calendar'])) {
             $data['show_in_calendar'] = $data['show_in_calendar'] == 1 ? 1 : 0;
         }
         $data['changed'] = new \Nette\DateTime();
         //$data['ad_shire'] = isset($data['ad_shire']) && $data['ad_shire'] == 0 ? null : $data['ad_shire'];
         //$data['ad_category'] = isset($data['ad_category']) && $data['ad_category'] == 0 ? null : $data['ad_category'];
         $cats = $data['categories'];
         unset($data['categories']);
         $this->setCategories($data['id'], $cats);
     }
     parent::update($data);
 }
開發者ID:soundake,項目名稱:pd,代碼行數:39,代碼來源:Venues.php

示例5: update

 function update($data)
 {
     $condition = array($this->where, $this->parameters);
     $this->where[0] = "{$this->delimitedColumn} = ?";
     $this->parameters[0] = $this->active;
     $return = parent::update($data);
     list($this->where, $this->parameters) = $condition;
     return $return;
 }
開發者ID:Vrtak-CZ,項目名稱:NJLogParser,代碼行數:9,代碼來源:nette.min.php

示例6: update

 /**
  * Updates all rows in result set.
  *
  * Joins in UPDATE are supported only in MySQL
  *
  * @param array|\Traversable $data ($column => $value)
  * @return int number of affected rows
  * @throws \Nette\InvalidArgumentException
  */
 public function update($data)
 {
     return $this->selection->update($data);
 }
開發者ID:filsedla,項目名稱:hyperrow,代碼行數:13,代碼來源:HyperSelection.php

示例7: update

 public function update($data, $checkData = FALSE)
 {
     if ($checkData) {
         $data['code'] = Nette\Utils\Strings::webalize($data['subject_name'] . " " . $data['name']);
     }
     $coords = Geolocation::getCoordsFromText($data['subject_gps']);
     $data['lat'] = $coords[0];
     $data['lon'] = $coords[1];
     $data['last_edit_id'] = isset($this->context->user->id) ? $this->context->user->id : NULL;
     parent::update($data);
 }
開發者ID:soundake,項目名稱:pd,代碼行數:11,代碼來源:Events.php

示例8: update

 public function update($data)
 {
     parent::update($data);
 }
開發者ID:soundake,項目名稱:pd,代碼行數:4,代碼來源:EventsTimes.php


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