• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination Trouble

Hi Guys,
i have problem with pagination, i dont know what i have todo cuz i am nubie. The problem is if i click number 2 the data still not change.

here my controller

public function headline(){
$data['query'] = $this->headline_model->getall();
$config['base_url'] = base_url().'login/headline/';
$config['total_rows'] = 200;
$config['per_page'] = 20;
$this->load->view('backend/headline_view', $data);

heres my model

class Headline_model extends CI_model{

function __construct()

// ini untuk mengambil //
function getall(){
$query = $this->db->get('headline');
return $query->result();

function findById($id) {
        $this->db->where('id', $id);
       $query = $this->db->get('headline');
        return $query->row_array();

function update(){
$data = array(


<table class="tableberita" width="800" border="0" cellspacing="1" cellpadding="3">
    <td width="28" align="center" valign="middle"><strong>ID</strong></td>
    <td width="583" align="center" valign="middle"><strong>Title Content</strong></td>
    <td width="167" align="center" valign="middle"><strong>Keterangan</strong></td>
  &lt;?php $i = 1 ?&gt;
  &lt;?php foreach ($query as $row):  ?&gt;
    <td align="center" valign="middle">&lt;?php echo $i++ ?&gt;</td>
    <td align="left" valign="middle">&lt;?php echo $row->title ?&gt;</td>
    <td align="center" valign="middle">| &lt;?php echo anchor('login/editheadline/'.$row->id,'Edit');?&gt; |</td>
&lt;?php endforeach; ?&gt;
&lt;?php echo $this->pagination->create_links(); ?&gt;

please help me.. Sad

please help me guys, i am nubie

You need to specify the uri_segment config option of your pagination.

[quote author="Aken" date="1342582723"]You need to specify the uri_segment config option of your pagination.[/quote]


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.