[eluser]Tyler Diaz[/eluser]
I've been working around this pagination for hours and cannot seem to find my way into it.
Code:
$this->load->library('pagination');
$config = array(
'base_url' => site_url('inbox'),
'total_rows' => 21,
'per_page' => 5,
'uri_segment' => 2,
'full_tag_open' => '<p>',
'full_tag_close' => '</p>'
);
$query = $this->db->query("SELECT x, x, x, x, x, x
FROM `x`
LIMIT ".$this->uri->segment(2).", ".$config['per_page']."
Originally the links would not work - Till I used this (".$this->uri->segment(2).") and now it return a MYSQL error due to it returns an empty string.
Then it does a foreach, then I initialize the config ($this->pagination->initialize($config)) and parse it in the view ('pagination' => $this->pagination->create_links(),) Any help?