遇到 PHP 错误严重性:通知消息:未定义偏移量:1 文件名:views/view_performance.php 行号:28

问题描述

public function showPerformance($staff_id,$term_id,$year){

        //$staff_id="ST00236";
        $data['subjectdata']=$this->scores_mdl->getSubjectData($staff_id,$year);
        $data['term']=$term_id;
        $data['year']=$year;
        $data['staff_id']=$staff_id;
        $data['view']="view_performance";
        $data['module']="scores";
        echo Modules::run('templates/main',$data);
    }

    public function getPerformanceData($staff_id,$year,$subject_id){

        $reports=$this->scores_mdl->getPerformance($staff_id,$subject_id);

        return $reports;
        //print_r($reports);

    }

public function staffData($staff_id,$year){

        //$this->db->distinct('scores.term_id');
        $this->db->where("scores.year",$year);
        $this->db->where("scores.term_id",$term_id);
        $this->db->where('scores.staff_id',$staff_id);
        //$this->db->join("staff","staff.staff_id=scores.staff_id");
        $this->db->join("indicators","indicators.indicator_id=scores.indicator_id");
        $this->db->join("subjects","subjects.subject_id=scores.subject_id");
        $this->db->join("classes","classes.class_id=scores.class_id");
        //$this->db->join("terms","terms.term_id=scores.term_id");
        //$this->db->group_by('scores.term_id,scores.year');

         $query = $this->db->get($this->table); 
         return $query->result();
       
    }

第 28 行在这里<?PHP echo $subjectdata[1]->year; ?>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)