src/MVC/DataBase/Model.php
protected function delete(array $criteria = array())
    {
        $conditions = array();
        
        foreach ($criteria as $field => $value) {
            $conditions[] = "$field = ?";
        }
        
        $sql = "DELETE FROM $this->_table WHERE " . implode(' AND ', $conditions);
        
        $pdos = $this->_pdo->prepare($sql);
        
        $pdos->execute(array_values($criteria));
        
        return $pdos->statement()->rowCount();
    }
protected function delete(array $criteria = array())
    {
        $conditions = array();
        
        foreach ($criteria as $field => $value) {
            $conditions[] = "$field = ?";
        }
        
        $sql = "DELETE FROM $this->_table WHERE " . implode(' AND ', $conditions);
        
        $pdos = $this->_pdo->prepare($sql);
        
        $pdos->execute(array_values($criteria));
        
        return $pdos->statement()->rowCount();
    }
protected function delete ( array $ criteria = array ( ) ) { $ conditions = array ( ) ; foreach ( $ criteria as $ field => $ value ) { $ conditions [ ] = "$field = ?" ; } $ sql = "DELETE FROM $this->_table WHERE " . implode ( ' AND ' , $ conditions ) ; $ pdos = $ this -> _pdo -> prepare ( $ sql ) ; $ pdos -> execute ( array_values ( $ criteria ) ) ; return $ pdos -> statement ( ) -> rowCount ( ) ; }
Function SQL DELETE
@access protected
@param array $criteria
@return int
Function SQL DELETE