当我想在分页页2中搜索月份"april"和年份"2014"到月份"mei"时,编码器出现错误
this is controller
function index($nama='', $bln = 0, $thn = 0)
{
if (!$nama AND $this->input->post('nama'))
{
$nama = $this->input->post('nama');
}
else if(!$nama)
{
$nama = 0;
}
if (!$bln AND $this->input->post('bulan'))
{
$bln = $this->input->post('bulan');
}
else if(!$bln)
{
$bln = 0;
}
if (!$thn AND $this->input->post('tahun'))
{
$thn = $this->input->post('tahun');
}
else if(!$thn)
{
$thn = 0;
}
$count = $this->miuran->get_count_iuran($nama, $bln, $thn);
// Set up pagination
$offset = 0;
$perpage = 5;
$uri_segment = 7;
if ($count > $perpage) {
$this->load->library('pagination');
$this->load->config('pagination');
$config = $this->config->item('pag');
$config['base_url'] = site_url('pelatih/iuran/'.$nama.'/'.$bln.'/'.$thn);
$config['total_rows'] = $count;
$config['per_page'] = $perpage;
$config['uri_segment'] = $uri_segment;
$this->pagination->initialize($config);
$this->data['pagination'] = $this->pagination->create_links();
if($this->uri->segment($uri_segment)){
$offset = $this->uri->segment($uri_segment);
}
}
else
{
$this->data['pagination'] = '';
$offset = 0;
}
$this->data['anggota'] = $this->miuran->get_daftar_iuran($bln, $thn,$nama,$perpage,$offset);
$this->data['title'] ='UKM Taekwondo | iuran';
$this->data['orang'] = $this->mlogin->dataPengguna($this->session->userdata('username'));
$this->data['contents'] = $this->load->view('pelatih/iuran/view_iuran', $this->data, true);
$this->load->view('template/wrapper/pelatih/wrapper_anggota',$this->data);
}
当我切换到第二页数据回到月"mei"
请告诉我该怎么做。
谢谢。
是否尝试加载日期帮助器http://ellislab.com/codeigniter/user-guide/helpers/date_helper.html