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