PHP错误:无法重新声明类

时间:2015-08-19 10:51:53

标签: php codeigniter

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class dept_officer extends CI_Model{

    function __construct()
     {
         parent::__construct();
     }

     function get_sponsorship_list()
     {
         $this->db->from('tbl_donor');
         $this->db->join('tbl_sponsorship', 'tbl_donor.DonorId = tbl_sponsor.DonorId');
         $query = $this->db->get();
         return $query->result(); 
     }

    function get_programme_list()
     {
         $this->db->from('tbl_program');
         $this->db->join('tbl_sponsorship', 'tbl_program.SponsorshipId = tbl_sponsor.ponsorshipId');
         $query = $this->db->get();
         return $query->result(); 
     }

    function get_child_list()
     {
         $this->db->from('tbl_child');
         $this->db->join('tbl_family', 'tbl_child.FamilyID = tbl_family.FamilyID');
         $this->db->join('tbl_school', 'tbl_child.SchoolID = tbl_school.SchoolID');
         $query = $this->db->get();
         return $query->result(); 
     }

    function get_crpo_list()
     {
         $this->db->from('tbl_crpo');
         $this->db->join('tbl_district', 'tbl_ds_division.DistrictI = tbl_district.DistrictId'); 
         $this->db->join('tbl_dsdivision', 'tbl_crpo.ds_divisionId = tbl_ds_division.ds_divisionId');
         $query = $this->db->get();
         return $query->result(); 
     }
}

?>

我已创建此类以包含显示系统中不同用户列表的所有查询。我得到一个编译错误,说不能重新声明类dept_officer,即使我还没有尝试声明任何类。 以上是codeigniter中模型的代码

0 个答案:

没有答案