    public static function addViews($id) {
        $botlist = self::botlist();
        $nom = 0;
        foreach($botlist as $bot) {
            if(preg_match("/{$bot}/", $_SERVER['HTTP_USER_AGENT'])) {
                $nom = 1+$nom;
            }else{
                $nom = 0;
            }
        }
        if ($nom == 0) {
            # code...
            $sql = "UPDATE `posts` SET `views` = `views`+1 WHERE `id` = '{$id}' LIMIT 1";
            $q = Db::query($sql);
        }
    }

The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.