Exemple #1
0
 /**
  * 删除id指向的记录
  * @param $id
  * @return unknown_type
  */
 public function delete($id = null)
 {
     $this->setId($id);
     if ($this->_id === null) {
         throw new Hi_Db_Table_Exception("需要被删除行的id");
     }
     $cond = $this->_table->getCondition();
     $cond->add($this->_primaryKey, $this->_id);
     $this->_table->delete();
 }