Error number: 1052. Column 'id' in field list is ambigious
<p>I am trying to make a pagination table in codeigniter using php and bootstrap. As far as i want to run my code in browser i face the error subscribed in the title. I would be very pleasant and grateful if anyone could help me. Here is my code.</p>

<p>employees_model.php</p>

<pre><code>&lt;?php
class employees_model extends CI_Model{
    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }

    //fetch department details from database
    function get_employees_list($limit, $start)
    {
        $sql = 'select (id, employee_emer, mbiemer, adresa, email), department_emer from employee, department where department.id = employee.id_departament order by employee_emer limit ' . $start . ', ' . $limit;
        $query = $this-&gt;db-&gt;query($sql);
        return $query-&gt;result();
    }
}
?&gt;
</code></pre>

<p>employees.php</p>

<pre><code>&lt;?php
class employees extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this-&gt;load-&gt;helper('url');
        $this-&gt;load-&gt;database();
        $this-&gt;load-&gt;library('pagination');

        //load the department_model
        $this-&gt;load-&gt;model('employees_model');
    }

    public function index()
    {
        //pagination settings
        $config['base_url'] = site_url('employees/index');
        $config['total_rows'] = $this-&gt;db-&gt;count_all('employee');
        $config['per_page'] = "5";
        $config["uri_segment"] = 3;
        $choice = $config["total_rows"] / $config["per_page"];
        $config["num_links"] = floor($choice);

        //config for bootstrap pagination class integration
        $config['full_tag_open'] = '&lt;ul class="pagination"&gt;';
        $config['full_tag_close'] = '&lt;/ul&gt;';
        $config['first_link'] = false;
        $config['last_link'] = false;
        $config['first_tag_open'] = '&lt;li&gt;';
        $config['first_tag_close'] = '&lt;/li&gt;';
        $config['prev_link'] = '&amp;laquo';
        $config['prev_tag_open'] = '&lt;li class="prev"&gt;';
        $config['prev_tag_close'] = '&lt;/li&gt;';
        $config['next_link'] = '&amp;raquo';
        $config['next_tag_open'] = '&lt;li&gt;';
        $config['next_tag_close'] = '&lt;/li&gt;';
        $config['last_tag_open'] = '&lt;li&gt;';
        $config['last_tag_close'] = '&lt;/li&gt;';
        $config['cur_tag_open'] = '&lt;li class="active"&gt;&lt;a href="#"&gt;';
        $config['cur_tag_close'] = '&lt;/a&gt;&lt;/li&gt;';
        $config['num_tag_open'] = '&lt;li&gt;';
        $config['num_tag_close'] = '&lt;/li&gt;';

        $this-&gt;pagination-&gt;initialize($config);
        $data['page'] = ($this-&gt;uri-&gt;segment(3)) ? $this-&gt;uri-&gt;segment(3) : 0;

        //call the model function to get the department data
        $data['emplist'] = $this-&gt;employees_model-&gt;get_employees_list($config["per_page"], $data['page']);           

        $data['pagination'] = $this-&gt;pagination-&gt;create_links();

        //load the department_view
        $this-&gt;load-&gt;view('employees_view',$data);
    }
}
?&gt;
</code></pre>

<p>employees_view.php</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;PHP CodeIgniter Pagination with Bootstrap Styles | Example&lt;/title&gt;
    &lt;!--link the bootstrap css file--&gt;
    &lt;link rel="stylesheet" href="&lt;?php echo base_url("bootstrap/css/bootstrap.css"); ?&gt;"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class="container"&gt;
    &lt;div class="row"&gt;
        &lt;div class="col-md-12"&gt;
            &lt;table class="table table-striped table-hover"&gt;
                &lt;thead&gt;
                    &lt;tr&gt;
                        &lt;th&gt;#&lt;/th&gt;
                        &lt;th&gt;Employee ID&lt;/th&gt;
                        &lt;th&gt;Employee Number&lt;/th&gt;
                        &lt;th&gt;Employee Name&lt;/th&gt;
                        &lt;th&gt;Employee Surname&lt;/th&gt;
                        &lt;th&gt;Employee Address&lt;/th&gt;
                        &lt;th&gt;Employee Email&lt;/th&gt;
                    &lt;/tr&gt;
                &lt;/thead&gt;
                &lt;tbody&gt;
                    &lt;?php for ($i = 0; $i &lt; count($emplist); ++$i) { ?&gt;
                    &lt;tr&gt;
                        &lt;td&gt;&lt;?php echo ($page+$i+1); ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo $emplist[$i]-&gt;id; ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo $emplist[$i]-&gt;employee_emer; ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo $emplist[$i]-&gt;mbiemer; ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo $emplist[$i]-&gt;adresa; ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo $emplist[$i]-&gt;email; ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo $emplist[$i]-&gt;department_emer; ?&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;?php } ?&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="row"&gt;
        &lt;div class="col-md-12 text-center"&gt;
            &lt;?php echo $pagination; ?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Please HELP ME. THANK YOU IN ADVANCE!</p>