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


PHP Zend_Db_Table_Abstract::delete方法代码示例

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


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

示例1: delete

 /**
  * delete row(s)         
  * 
  * @param  array $data 
  * @return int
  */
 public function delete($id)
 {
     //delete permission of the resource
     $permissions = new Controlmodule_Model_DbTable_Permissions();
     $permissions->delete("resource_id=" . (int) $id);
     return parent::delete('id = ' . (int) $id);
 }
开发者ID:roigrande,项目名称:globalpms,代码行数:13,代码来源:Resources.php

示例2: delete

 public function delete($id)
 {
     try {
         parent::delete($id);
     } catch (Exception $e) {
         echo 'Ocorreu um erro ao excluir os dados.';
     }
 }
开发者ID:conectapb,项目名称:sysagroweb,代码行数:8,代码来源:Categoriapost.php

示例3: delete

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

示例4: delete

 public function delete($id)
 {
     try {
         parent::delete($id);
     } catch (Exception $exc) {
         //echo $exc->getTraceAsString();
         echo 'Ocorreu um erro ao excluir os dados';
     }
 }
开发者ID:conectapb,项目名称:sysagroweb,代码行数:9,代码来源:Usuario.php

示例5: delete

 public function delete($where)
 {
     if (count($where) == 0) {
         throw new Exception();
     }
     foreach ($where as $k => $v) {
         $where[$k . ' = ?'] = $v;
         unset($where[$k]);
     }
     return parent::delete($where);
 }
开发者ID:eryx,项目名称:labs,代码行数:11,代码来源:Table.php

示例6: bulkDelete

 /**
  * Bulk Delete entries
  *
  * @param  array With serialized ids
  * @return bool
  */
 protected function bulkDelete(array $bulkIds)
 {
     if (empty($bulkIds)) {
         return false;
     }
     foreach ($bulkIds as $id) {
         $primaryKey = urldecode($id);
         $where = $this->_getWhereStatement($primaryKey);
         $this->obj->delete($where);
     }
     return true;
 }
开发者ID:lagged,项目名称:zf_crud,代码行数:18,代码来源:Controller.php

示例7: deleteNode

 /**
  * deleteNode
  * @param integer $intNodeId
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0 
  */
 public function deleteNode($intNodeId)
 {
     $this->intNodeId = $intNodeId;
     $this->loadNodeData();
     if ($this->objNodeData instanceof Zend_Db_Table_Rowset_Abstract && count($this->objNodeData) > 0) {
         $arrNode = $this->objNodeData->current()->toArray();
         if (!is_null($this->strDBFRoot)) {
             $this->intRootId = $arrNode[$this->strDBFRoot];
         }
         $this->lockTable();
         $strSqlAddonRootId = '';
         if (!is_null($this->strDBFRoot) && $this->intRootId > 0) {
             $strSqlAddonRootId = $this->strDBFRoot . ' = ' . $this->intRootId . ' AND ';
         }
         /**
          * delete categories
          */
         $this->objTable->delete($strSqlAddonRootId . $this->strDBFLft . ' BETWEEN ' . $arrNode[$this->strDBFLft] . ' AND ' . $arrNode[$this->strDBFRgt] . '');
         $this->shiftLRValues($arrNode[$this->strDBFRgt] + 1, $arrNode[$this->strDBFLft] - $arrNode[$this->strDBFRgt] - 1);
         $this->unlockTable();
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:28,代码来源:nested.set.class.php

示例8: delete

 public function delete($where)
 {
     parent::delete($where);
     //    $this->_purgeCache();
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:5,代码来源:Abstract.php

示例9: delete

 /**
  * Deletes existing rows.
  *
  * @param  array|string $where SQL WHERE clause(s).
  * @return int          The number of rows deleted.
  */
 public function delete($where)
 {
     Centurion_Signal::factory('pre_delete')->send($this, array($where));
     list($found, $return) = Centurion_Traits_Common::checkTraitOverload($this, 'delete', array($where));
     if (!$found) {
         $return = parent::delete($where);
     }
     Centurion_Signal::factory('post_delete')->send($this, array($where));
     return $return;
 }
开发者ID:rom1git,项目名称:Centurion,代码行数:16,代码来源:Abstract.php

示例10: delete

 /**
  * Delete from the database.
  *
  * @param MIDAS_GlobalDao $dao
  * @return true
  * @throws Zend_Exception
  */
 public function delete($dao)
 {
     if (!$dao->saved) {
         throw new Zend_Exception('The dao should be saved first ...');
     }
     if (!isset($this->_key) || !$this->_key) {
         $query = array();
         foreach ($this->_mainData as $name => $option) {
             if ($option['type'] == MIDAS_DATA) {
                 $query[$name . ' = ?'] = $dao->{$name};
             }
         }
         if (empty($query)) {
             throw new Zend_Exception('Huge error, you almost deleted everything');
         }
         parent::delete($query);
         $dao->saved = false;
         return true;
     }
     $key = $dao->getKey();
     if (!isset($key)) {
         throw new Zend_Exception('Unable to find the key');
     }
     parent::delete(array($this->_key . ' = ?' => $dao->getKey()));
     $key = $dao->_key;
     $dao->set($key, null);
     $dao->saved = false;
     return true;
 }
开发者ID:josephsnyder,项目名称:Midas,代码行数:36,代码来源:MIDASDatabasePdo.php

示例11: delete

 /**
  * Deletes existing rows.
  *
  * @param  array|string $where SQL WHERE clause(s).
  * @return int          The number of rows deleted.
  */
 public function delete($where)
 {
     $this->_setAdapter(Zoo::getService('db')->getDb('master'));
     return parent::delete($where);
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:11,代码来源:Table.php

示例12: delete

 /**
  * Deletes existing rows.
  * @param  array|string $where SQL WHERE clause(s).
  * @return int          The number of rows deleted.
  */
 public function delete($where)
 {
     $this->notifyObservers('beforeDelete', array($this, &$where));
     $result = parent::delete($where);
     $this->notifyObservers('afterDelete', array($this, $result, $where));
     return $result;
 }
开发者ID:grrr-amsterdam,项目名称:garp3,代码行数:12,代码来源:Db.php

示例13: deleteByActionId

 /**
  * Delete all rules that are for a specific action
  *
  * @param int $actionId
  * @return int number of deleted rows
  */
 public function deleteByActionId($actionId)
 {
     return parent::delete($this->getAdapter()->quoteInto('uaru_uaa_id = ?', $actionId, Zend_Db::INT_TYPE));
 }
开发者ID:kevindragon221,项目名称:Webdesktop,代码行数:10,代码来源:Rule.php

示例14: delete

 public function delete($where)
 {
     if ($this->_cache) {
         $this->_cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG);
     }
     return parent::delete($where);
 }
开发者ID:adrianosouzas,项目名称:calculo-tributos,代码行数:7,代码来源:AbstractDbTable.php

示例15: delete

 /**
  * Delete the record by its id
  * 
  * @param int $id 
  */
 public function delete($id)
 {
     try {
         if ($this->useTransaction()) {
             $this->getAdapter()->beginTransaction();
         }
         $tmp = $this->get($id);
         //$objid = $tmp->objid;
         $where = $this->getAdapter()->quoteInto($this->_primary . ' = ?', $id);
         $r = parent::delete($where);
         //            $do = new Agana_Domain_Object();
         //            $o = $do->getById($objid);
         //            $do->setObject($o);
         //            $do->delete();
         if ($this->useTransaction()) {
             $this->getAdapter()->commit();
         }
         return;
     } catch (Exception $pdoe) {
         if ($this->useTransaction()) {
             $this->getAdapter()->rollBack();
         }
         throw new Agana_Exception($pdoe->getMessage());
     }
 }
开发者ID:brunopbaffonso,项目名称:ongonline,代码行数:30,代码来源:Abstract.php


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