title: join in codeigniter returns multiple values
body: <p>I have a problem joining two tables. In my first table, I want to retrieve 1 row for the time, and in the 2nd table I want to retrieve the table_number and table_sizes with both table having the same key which is the resto_id. But it seems to return repeating values for the time. I've tried using group_by but it didnt work out.</p>
  
  <p>here's my model:</p>
  
  <pre><code>$this-&gt;db-&gt;where('resto_settings_time.resto_id',$id);
  $this-&gt;db-&gt;select('op_time_start,op_time_end, table_number, table_size');
  $this-&gt;db-&gt;from('resto_settings_time');
  $this-&gt;db-&gt;join('resto_settings_table', 'resto_settings_time.resto_id = resto_settings_table.resto_id', 'left');
  $query = $this-&gt;db-&gt;get();
  return $query-&gt;result();
  </code></pre>
  
  <p>my Controller:</p>
  
  <pre><code>$data['rows'] = $this-&gt;process_resto_list-&gt;rsrv_details($id);
      $this-&gt;load-&gt;view('sample',$data);
  </code></pre>
  
  <p>my view:</p>
  
  <pre><code>foreach ($rows as $row) {
          echo $start= $row-&gt;op_time_start . br();
          echo $end= $row-&gt;op_time_end . br();
          echo $num = $row-&gt;table_number . br();
          echo $size = $row-&gt;table_size . br();
      }
  </code></pre>
  
  <p>And here is what it returns:</p>
  
  <blockquote>
    <p>07:00:00
    24:00:00
    7
    3
    07:00:00
    24:00:00
    6
    4</p>
  </blockquote>
  
  <p>I would like 07:00:00 24:00:00 to repeat only once.. Please help me out, I'm really confused. Any help will be much appreciated. Thank you</p>