[eluser]nofearinc[/eluser]
It's 20 parameters from 6 joined tables, but the important part is that I generate query with $_POST parameters and logically they aren't persistent during paging.
Code:
function sell() {
$per_page = 10;
$base_url = site_url('results/sell');
$config['uri_segment'] = 3;
$query = $this->offers->get_all_sell($per_page,
$this->uri->segment($config['uri_segment']),
...
$this->input->post('min_area'),
$this->input->post('max_area'),
$this->input->post('min_price'),
$this->input->post('max_price'),
$this->input->post('min_category'),
$this->input->post('max_category'),
...);
$config['base_url'] = site_url('results/sell');
$config['total_rows'] = $this->offers->get_sell_count(
...
$this->input->post('min_area'),
$this->input->post('max_area'),
$this->input->post('min_price'),
$this->input->post('max_price'),
$this->input->post('min_category'),
$this->input->post('max_category'),
...);
$config['per_page'] = $per_page;
$this->pagination->initialize($config);
$data['pagination'] = $this->pagination->create_links();
$data['offers'] = $query->result();
$data['contentFile'] = "results/sell_view.php";
$this->load->view("/template", $data);
}