在不使用分页的情况下在codeigniter中显示视图文件中的大量记录时出现问题

时间:2014-03-06 07:22:37

标签: php mysql codeigniter

我从mysql db table&中获取用户列表在我的codeigniter应用程序的视图文件上显示,我没有使用分页,我想在同一页面上显示所有记录。但是只有部分数据显示在页面上,我有3000条记录,但页面上只显示1000到1500条记录。在此脚本消失之后,我尝试更改max_execution_time max_input_time memory_limit但没有帮助。

public function UsersCe14($sort = NULL, $column = NULL) {
   if (!empty($sort)) {
        switch ($column) {
           case 'ID':
               $sortColumn = '`id`';
               break;
           case 'Username':
               $sortColumn = '`username`';
               break;
           case 'FirstName':
               $sortColumn = '`first_name`';
               break;
           case 'LastName':
               $sortColumn = '`last_name`';
               break;
           case 'Email':
               $sortColumn = '`email`';
               break;
           case 'Country':
               $sortColumn = '`country`';
               break;
           case 'Registered':
               $sortColumn = "`core_entities`.`created`";
               break;
           case 'LastLogin':
               $sortColumn = '`last_login`';
               break;
           case 'Suspended':
               $sortColumn = '`suspended`';
               break;
           case 'Active':
               $sortColumn = '`is_active`';
               break;
       }
       $data['sort'] = $sort == 'DESC' ? 'ASC' : 'DESC';
       $sortColumn = $sortColumn . " " . $sort;
   } else {
       $data['sort'] = 'DESC';
       $sortColumn = "`core_entities`.`created` DESC";
   }

   if (!$this->biipmi_auth->is_logged_in()) {
       redirect(site_url('admin/login'));
       return;
   }

   if (!$this->biipmi_auth->is_admin()) {
       redirect(site_url());
       return;
   }

   $this->load->model('biipmi_entity/biipmi_person_model');
   $data['users'] = $this->biipmi_person_model->get_persons(NULL, NULL, $sortColumn, NULL, NULL, array("email", "country", "last_login"), 'reference', array("2"));
   $data['page_title'] = 'biipmi Admin - CE14 Users';
   $data['main_content'] = 'admin/users/persons_ce14';
   $this->load->view('admin/includes/template', $data);
}

0 个答案:

没有答案