src/main/php/Database.php
public function query(string $sql, array $values = []): int
    {
        return $this->dbConnection->prepare($sql)
                ->execute($values)
                ->count();
    }
public function query(string $sql, array $values = []): int
    {
        return $this->dbConnection->prepare($sql)
                ->execute($values)
                ->count();
    }
public function query ( string $ sql , array $ values = [ ] ) : int { return $ this -> dbConnection -> prepare ( $ sql ) -> execute ( $ values ) -> count ( ) ; }
sends a query to the database and returns amount of affected records

@param   string  $sql
@param   array   $values
@return  int
@since   3.1.0
sends a query to the database and returns amount of affected records