public function delete()
    {
        $database = DatabaseLayer::getInstance();

        $delete = $database->delete($this->getTableName(), $this->getTableAlias());
        $delete->setModel($this);
        $delete->condition($this->getIDField(), $this->getId());
        $delete->execute($this->getClass());

        // Invalidate cache.
        SearchIndex::getInstance()->expire($this->getTableName(), $this->getId());

        return true;
    }
public function delete()
    {
        $database = DatabaseLayer::getInstance();

        $delete = $database->delete($this->getTableName(), $this->getTableAlias());
        $delete->setModel($this);
        $delete->condition($this->getIDField(), $this->getId());
        $delete->execute($this->getClass());

        // Invalidate cache.
        SearchIndex::getInstance()->expire($this->getTableName(), $this->getId());

        return true;
    }
public function delete ( ) { $ database = DatabaseLayer :: getInstance ( ) ; $ delete = $ database -> delete ( $ this -> getTableName ( ) , $ this -> getTableAlias ( ) ) ; $ delete -> setModel ( $ this ) ; $ delete -> condition ( $ this -> getIDField ( ) , $ this -> getId ( ) ) ; $ delete -> execute ( $ this -> getClass ( ) ) ; // Invalidate cache. SearchIndex :: getInstance ( ) -> expire ( $ this -> getTableName ( ) , $ this -> getId ( ) ) ; return true ; }
Delete the selected record
@return boolean
Delete the selected record