微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决遇到 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 举报,一经查实,本站将立刻删除。