title: Codeigniter, setting up pagination
body: <p>So, i'm having a problem to setting up pagination on my site.</p>
  
  <p>First of all, if i'm at the first page of my site, and pressing to go to page 2, the "1" still stays bold. Though i can see in the url that i am at page 2.</p>
  
  <p>Secondly, i need some help to retrieve the data correctly. If i am at page 1, i want to get all records 1-10. If i am on page 2, i want to get all records from 11-20. Got it?</p>
  
  <p>I have google'd and tried to find any solution, without any success.</p>
  
  <pre><code>$this-&gt;db-&gt;select('*');
  $this-&gt;db-&gt;from('comments');
  $this-&gt;db-&gt;where('comments.url_friendly', $id);
  $this-&gt;db-&gt;join('allt', 'allt.url_friendly = comments.url_friendly', 'left');
  $this-&gt;db-&gt;order_by('comments.date', 'asc');
  $data['query'] = $this-&gt;db-&gt;get();
  
  $data['title'] = 'Kommentarer - '.$data['query']-&gt;row()-&gt;amne;
  
  $config['base_url'] = base_url(). 'kommentarer/'.$data['query']-&gt;row()-&gt;url_friendly;
  $config['total_rows'] = $data['query']-&gt;num_rows();
  $config['per_page'] = 10;
  
  $this-&gt;pagination-&gt;initialize($config); 
  
  $data['pagination'] = $this-&gt;pagination-&gt;create_links();
  </code></pre>
  
  <p>Also, i'm using the code in post 2, in <a href="https://stackoverflow.com/questions/7666254/codeigniter-2-0-3-pagination-class-starting-page">this thread</a>.</p>
  
  <p>And yes, i'm new to Codeigniter, as you can see.</p>