framework/db/ar/CActiveRecord.php
public function delete()
	{
		if(!$this->getIsNewRecord())
		{
			Yii::trace(get_class($this).'.delete()','system.db.ar.CActiveRecord');
			if($this->beforeDelete())
			{
				$result=$this->deleteByPk($this->getPrimaryKey())>0;
				$this->afterDelete();
				return $result;
			}
			else
				return false;
		}
		else
			throw new CDbException(Yii::t('yii','The active record cannot be deleted because it is new.'));
	}
public function delete()
	{
		if(!$this->getIsNewRecord())
		{
			Yii::trace(get_class($this).'.delete()','system.db.ar.CActiveRecord');
			if($this->beforeDelete())
			{
				$result=$this->deleteByPk($this->getPrimaryKey())>0;
				$this->afterDelete();
				return $result;
			}
			else
				return false;
		}
		else
			throw new CDbException(Yii::t('yii','The active record cannot be deleted because it is new.'));
	}
public function delete ( ) { if ( ! $ this -> getIsNewRecord ( ) ) { Yii :: trace ( get_class ( $ this ) . '.delete()' , 'system.db.ar.CActiveRecord' ) ; if ( $ this -> beforeDelete ( ) ) { $ result = $ this -> deleteByPk ( $ this -> getPrimaryKey ( ) ) > 0 ; $ this -> afterDelete ( ) ; return $ result ; } else return false ; } else throw new CDbException ( Yii :: t ( 'yii' , 'The active record cannot be deleted because it is new.' ) ) ; }
Deletes the row corresponding to this active record.
@throws CDbException if the record is new
@return boolean whether the deletion is successful.
Deletes the row corresponding to this active record .