[eluser]weetstraw[/eluser]
When I click the link to view the next set of results, I get a 404 not found...
Code:
//Controller
function index()
{
// Pagination
$config['base_url']=base_url()."home/";
$config['total_rows']=$this->db->count_all('content');
$config['per_page']=2;
$this->pagination->initialize($config);
echo
// Page Content
$data=array(
'result'=>$this->Home_model->getRecentPag($config['per_page'],$this->uri->segment(1)),
'comments'=>$this->Home_model->getComments(),
'title'=>"",
'pagination'=>$this->pagination->create_links()
);
$this->load->view('home_view',$data);
}
Code:
// Model
function getRecentPag($num,$offset)
{
$this->db->order_by('id','DESC');
$query=$this->db->get('content',$num,$offset);
return $query->result();
}
Code:
//Link
http://localhost/CodeIgniter/home/2
Any idea??