    public static function name($id) {
        $id = sprintf('%d', $id);
        if(isset($id)){
            $cat = Db::result("SELECT `name` FROM `cat` 
                                WHERE `id` = '{$id}' LIMIT 1");
            //print_r($cat);
            if(isset($cat['error'])){
                return '';
            }else{
                return $cat[0]->name;
            }
            
        }else{
            echo "No ID Selected";
        }
        
        //print_r($cat);
    }

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.