Paginierung ändert die Seite nicht

Ich arbeite an der Paginierung für meine Website, bei der ich Daten aus zwei Tabellen in einer Datenbank anzeige. Ich habe eine Paginierung auf meiner Seite, aber sie verhält sich nicht so, wie es angenommen wird, dass sie die Seiten nicht ändert. Derzeit habe ich 16 Datensätze auf der Webseite angezeigt und eingestellt$config['per_page'] = 1; Die Paginierungsleiste reicht bis zu 16, blättert jedoch nicht durch die Seiten. Alle Datensätze werden auf der Seite angezeigt. Jede Hilfe wird hier geschätzt, ist mein Code:

Regler

 <?php

class Result_controller extends CI_Controller{

    function getall(){

        $this->load->model('result_model');
        $data['query'] = $this->result_model->result_getall();
        // print_r($data['query']); die();


        $this->load->library('pagination');

        $config['base_url'] = 'http://localhost/Surva/index.php/result_controller/getall';
        $config['total_rows'] = $this->db->get('tblanswers, credentials')->num_rows();
        $config['per_page'] = 1;
        $config['num_links'] = 10;


        $this->pagination->initialize($config);

        $data['records'] = $this->db->get('tblanswers, credentials', $config['per_page'], $this->uri->segment(1, 0))->result_array();
        $data['pagination'] = $this->pagination->create_links();
        $this->load->view('result_view', $data);




        }


}

?>

Aussicht

   <div>    






     <table border="1">


      <tr>
         <th>Name</th>
         <th>Second Name</th>
         <th>Phone</th>
         <th>Email</th>
         <th>Answer</th>
         <th>Comment</th>
     </tr>
      <?php foreach ($query as $row): ?> 
     <tr>

         <td><?php echo $row->name; ?></td>
         <td><?php echo $row->second_name; ?></td>
         <td><?php echo $row->phone; ?></td>
         <td><?php echo $row->email; ?></td>
          <td> <?php echo $row->answerA;?>
          <?php echo $row->answerB;?>
          <?php echo $row->answerC;?></td>
         <td><?php echo $row->comment;?><br></td>

     </tr>

      <?php endforeach; ?>

     </table>  
     <?php if (isset($pagination))
      {
       echo $pagination;
      // echo "<pre>"; var_dump($query);
       } ?>

Modell-

function result_getall(){

   return $this->db->select('tblanswers.*,credentials.*')
                         ->from('tblanswers, credentials')
                         ->get()
                         ->result_object();

Antworten auf die Frage(3)

Ihre Antwort auf die Frage