public function destroy()
    {
        if (!self::$_loaded) {
            self::_loadColumns();
        }

        $calling = get_called_class();

        if (!self::_checkCallback($calling, "before_destroy", $this)) {
            return false;
        }

        $table_name = $calling::getTableName();
        $pk         = $calling::isIgnoringCase() ? strtolower($calling::getPK()) : $calling::getPK();
        $pk_value   = $this->_data[$pk];
        $escape     = Driver::$escape_char;
        $sql        = "delete from $escape$table_name$escape where $escape$table_name$escape.$escape".self::$_mapping[$calling][$pk]."$escape=?";

        $rst = self::executePrepared($sql, array($pk_value))->rowCount()==1;
        if ($rst) {
            self::_checkCallback($calling, "after_destroy", $this);
        }
        return $rst;
    }
public function destroy()
    {
        if (!self::$_loaded) {
            self::_loadColumns();
        }

        $calling = get_called_class();

        if (!self::_checkCallback($calling, "before_destroy", $this)) {
            return false;
        }

        $table_name = $calling::getTableName();
        $pk         = $calling::isIgnoringCase() ? strtolower($calling::getPK()) : $calling::getPK();
        $pk_value   = $this->_data[$pk];
        $escape     = Driver::$escape_char;
        $sql        = "delete from $escape$table_name$escape where $escape$table_name$escape.$escape".self::$_mapping[$calling][$pk]."$escape=?";

        $rst = self::executePrepared($sql, array($pk_value))->rowCount()==1;
        if ($rst) {
            self::_checkCallback($calling, "after_destroy", $this);
        }
        return $rst;
    }
public function destroy ( ) { if ( ! self :: $ _loaded ) { self :: _loadColumns ( ) ; } $ calling = get_called_class ( ) ; if ( ! self :: _checkCallback ( $ calling , "before_destroy" , $ this ) ) { return false ; } $ table_name = $ calling :: getTableName ( ) ; $ pk = $ calling :: isIgnoringCase ( ) ? strtolower ( $ calling :: getPK ( ) ) : $ calling :: getPK ( ) ; $ pk_value = $ this -> _data [ $ pk ] ; $ escape = Driver :: $ escape_char ; $ sql = "delete from $escape$table_name$escape where $escape$table_name$escape.$escape" . self :: $ _mapping [ $ calling ] [ $ pk ] . "$escape=?" ; $ rst = self :: executePrepared ( $ sql , array ( $ pk_value ) ) -> rowCount ( ) == 1 ; if ( $ rst ) { self :: _checkCallback ( $ calling , "after_destroy" , $ this ) ; } return $ rst ; }
Destroy the current object

@return boolean destroyed or not
Destroy the current object