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


PHP Zend_Db_Table_Abstract::update方法代码示例

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


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

示例1: update

 public function update($id, $state, $info)
 {
     $data = array('state' => $state, 'info' => $info, 'lastupdate' => time());
     $found = $this->find($id);
     if ($found) {
         $data = array_merge($found, $data);
         unset($data['id']);
         $this->dbTable->update($data, array('id = ?' => $id));
     } else {
         $data['id'] = $id;
         $data['sticked'] = 0;
         $this->dbTable->insert($data);
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:14,代码来源:Mapper.php

示例2: update

 public function update(array $data, $where)
 {
     if (!isset($data['updated_at'])) {
         $data['updated_at'] = date('Y-m-d H:i:s');
     }
     return parent::update($data, $where);
 }
开发者ID:eleclerc,项目名称:subyt,代码行数:7,代码来源:Tag.php

示例3: updateProfile

 public function updateProfile($data, $user_id)
 {
     $value['first_name'] = $data['first_name'];
     $value['middle_name'] = $data['middle_name'];
     $value['last_name'] = $data['last_name'];
     return parent::update($value, array('user_id = ?' => $user_id));
 }
开发者ID:relyd,项目名称:aidstream,代码行数:7,代码来源:Profile.php

示例4: updateStatus

 public function updateStatus($status, $id)
 {
     foreach ($status as $key => $val) {
         $data[$key] = $val;
     }
     return parent::update($data, array('user_id = ?' => $id));
 }
开发者ID:relyd,项目名称:aidstream,代码行数:7,代码来源:User.php

示例5: update

 public function update(array $data, $where)
 {
     if (empty($data['updated_at'])) {
         $data['updated_at'] = new Zend_Db_Expr('NOW()');
     }
     return parent::update($data, $where);
 }
开发者ID:wangshipeng,项目名称:Php-Online,代码行数:7,代码来源:BaseModel.php

示例6: update

 public function update($data, $where)
 {
     parent::update($data, $where);
     $this->where = $where;
     $this->data = $data;
     $this->_notifyObservers("update");
 }
开发者ID:marcelocaixeta,项目名称:zf1,代码行数:7,代码来源:Observable.php

示例7: update

 public function update(array $data, $where)
 {
     $data = $this->filter($data);
     if (count($data) <= 0) {
         return false;
     }
     return parent::update($data, $where);
 }
开发者ID:roed,项目名称:zend-mvc-extend,代码行数:8,代码来源:Abstract.php

示例8: changeGroupadminUsername

 public function changeGroupadminUsername($old_group_identifier, $group_identifier, $user_id)
 {
     $old_username = $old_group_identifier . '_group';
     $data['user_name'] = $group_identifier . '_group';
     parent::update($data, array('user_name = ?' => $old_username));
     $userGroupModel = new User_Model_DbTable_UserGroup();
     $userGroupModel->updateUsername($group_identifier, $user_id);
 }
开发者ID:relyd,项目名称:aidstream,代码行数:8,代码来源:User.php

示例9: _update

 /**
  * Update DB row with data
  *
  * @param mixed $id   ''
  * @param array $data ''
  * @return void
  * @throws Zend_Exception if row cannot be updated
  */
 private function _update($id, $data)
 {
     try {
         $stmt = $this->_getWhereStatement($id);
         $this->obj->update($data, $stmt);
     } catch (\Zend_Exception $e) {
         throw $e;
     }
 }
开发者ID:lagged,项目名称:zf_crud,代码行数:17,代码来源:Controller.php

示例10: updates

 public function updates($id, $titulo, $comentario, $noticia, $foto, $data, $fonte, $ativo, $categoria_noticia_id)
 {
     try {
         $data = array('titulo' => $titulo, 'comentario' => $comentario, 'noticia' => $noticia, 'foto' => $foto, 'fonte' => $fonte, 'ativo' => $ativo, 'categoria_noticia_id' => $categoria_noticia_id);
         parent::update($data, 'id = ' . (int) $id);
     } catch (Exception $e) {
         echo 'Opa... algum problema aconteceu.';
     }
 }
开发者ID:conectapb,项目名称:sysagroweb,代码行数:9,代码来源:Noticia.php

示例11: updates

 public function updates($id, $titulo, $comentario, $entrevista, $foto, $data, $entrevistado, $reporter, $ativo)
 {
     try {
         $dados = array('titulo' => $titulo, 'comentario' => $comentario, 'entrevista' => $entrevista, 'foto' => $foto, 'data' => $data, 'entrevistado' => $entrevistado, 'reporter' => $reporter, 'ativo' => $ativo);
         parent::update($dados, 'id = ' . (int) $id);
     } catch (Exception $e) {
         echo 'Opa... algum problema aconteceu.';
     }
 }
开发者ID:conectapb,项目名称:sysagroweb,代码行数:9,代码来源:Entrevista.php

示例12: update

 public function update(array $data, $where)
 {
     // хешируем пароль
     if (isset($data['password'])) {
         $data['salt'] = $salt = self::generateSalt();
         $data['password'] = self::getPasswordHash($data['password'], $salt);
     }
     return parent::update($data, $where);
 }
开发者ID:Konstnantin,项目名称:zf-app,代码行数:9,代码来源:User.php

示例13: updateNode

 /**
  * updateNode  
  * @param array $arrUpdateData
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0 
  */
 private function updateNode($arrUpdateData)
 {
     try {
         $strWhere = $this->objTable->getAdapter()->quoteInto('id = ?', $this->intNodeId);
         $this->objTable->update($arrUpdateData, $strWhere);
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:15,代码来源:nested.set.class.php

示例14: update

 public function update(array $data, $where)
 {
     $data['updatedDate'] = date("Y-m-d h:i:s");
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $userName = $auth->getIdentity()->username;
         $data['updatedBy'] = $userName;
     }
     return parent::update($data, $where);
 }
开发者ID:hukumonline,项目名称:quart80,代码行数:10,代码来源:UserDetail.php

示例15: setApplicationState

 /**
  * set application state
  *
  * @param   array $_applicationIds application ids to set new state for
  * @param   string $_state the new state
  * @throws  Tinebase_Exception_InvalidArgument
  */
 public function setApplicationState(array $_applicationIds, $_state)
 {
     if ($_state != Tinebase_Application::DISABLED && $_state != Tinebase_Application::ENABLED) {
         throw new Tinebase_Exception_InvalidArgument('$_state can be only Tinebase_Application::DISABLED  or Tinebase_Application::ENABLED');
     }
     $where = array($this->_db->quoteInto($this->_db->quoteIdentifier('id') . ' IN (?)', $_applicationIds));
     $data = array('status' => $_state);
     $affectedRows = $this->_applicationTable->update($data, $where);
     $this->_cleanCache();
     //error_log("AFFECTED:: $affectedRows");
 }
开发者ID:,项目名称:,代码行数:18,代码来源:


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