Hello can you help me with these error i get them idk how i just entered the site and i got this errors.
Fatal error: Call to a member function rowCount() on boolean in C:\xampp\htdocs\settings.php on line 6
if (isset($_COOKIE['hash'])) { 
    $sql = $db->query("SELECT * FROM `users` WHERE `hash` = " . $db->quote(filter_var($_COOKIE['hash'], FILTER_SANITIZE_STRING)));
    if ($sql->rowCount() != 0) { //line 6
        $row = $sql->fetch();
        $user = $row;
    }
}
Fatal error: Call to a member function fetchAll() on boolean in C:\xampp\htdocs\login.php on line 42
        $hash = md5($steamid . time() . rand(1, 50)); 
        $sql = $db->query("SELECT * FROM `users` WHERE `steamid` = '" . $steamid . "'");
        $row = $sql->fetchAll(PDO::FETCH_ASSOC); //line 42
        if (count($row) == 0) {
            $name = str_replace("script", "*", $name);
            $name = str_replace("/", "*", $name);
            $name = str_replace("<", "*", $name);
            $name = str_replace(">", "*", $name);
            $name = str_replace("body", "*", $name);
            $name = str_replace("onload", "*", $name);
            $name = str_replace("alert", "*", $name);
            $name = str_replace(")", "*", $name);
            $name = str_replace("(", "*", $name);
            $name = str_replace("'", "*", $name);
 
     
    