Welcome Guest, Not a member yet? Register   Sign In
Error Number: 1064 when URL add " - "
#3

[eluser]johanriyan[/eluser]
dear Pravins,

thks for reply.

this is my model :

Code:
<?php

class User_model extends CI_Model{

    function get_all($num, $offset)
    {
        
        $this->db->order_by('no', 'ASC');
        $data=$this->db->get('user', $num, $offset);
        return $data->result();
    }
    
    function save($data){
        
        $this->db->insert('user',$data);
    }
}


and this is my controller :

Code:
public function about($id=NULL){

//pengaturan pagination
$jml = $this->db->get('user');

$config['base_url'] = base_url().'index.php/bootstrap/about';
$config['total_rows'] = $jml->num_rows();
$config['per_page'] = '2';
$config['first_page'] = 'Awal';
$config['last_page'] = 'Akhir';
$config['next_page'] = '«';
$config['prev_page'] = '»';





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

       //buat pagination
$data['halaman'] = $this->pagination->create_links();
      
    

       //tamplikan data
    $data['query'] = $this->user_model->get_all($config['per_page'], $id);
$this->load->view('include/header');
$this->load->view('about',$data);
$this->load->view('include/footer');


}


how to fix it.
thks.


Messages In This Thread
Error Number: 1064 when URL add " - " - by El Forum - 06-19-2013, 06:34 PM
Error Number: 1064 when URL add " - " - by El Forum - 06-19-2013, 09:15 PM
Error Number: 1064 when URL add " - " - by El Forum - 06-19-2013, 09:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB