public function delete()
	{
		$this->verifyNotReadonly('delete');

		$pk = $this->valuesForPk();

		if (empty($pk))
			throw new ActiveRecordException("Cannot delete, no primary key defined for: " . get_called_class());

		if (!$this->invokeCallback('beforeDestroy',false))
			return false;

		static::table()->delete($pk);
		$this->invokeCallback('afterDestroy',false);

		return true;
	}
public function delete()
	{
		$this->verifyNotReadonly('delete');

		$pk = $this->valuesForPk();

		if (empty($pk))
			throw new ActiveRecordException("Cannot delete, no primary key defined for: " . get_called_class());

		if (!$this->invokeCallback('beforeDestroy',false))
			return false;

		static::table()->delete($pk);
		$this->invokeCallback('afterDestroy',false);

		return true;
	}
public function delete ( ) { $ this -> verifyNotReadonly ( 'delete' ) ; $ pk = $ this -> valuesForPk ( ) ; if ( empty ( $ pk ) ) throw new ActiveRecordException ( "Cannot delete, no primary key defined for: " . get_called_class ( ) ) ; if ( ! $ this -> invokeCallback ( 'beforeDestroy' , false ) ) return false ; static :: table ( ) -> delete ( $ pk ) ; $ this -> invokeCallback ( 'afterDestroy' , false ) ; return true ; }
Deletes this model from the database and returns true if successful.

@return boolean
Deletes this model from the database and returns true if successful .