title: Displaying a single row in codeigniter integrated with facebox
body: <p>I've been using facebox recently and it's okay. But when i got to use it with codeigniter, its so hard for me. In this code that i put in codeigniter:</p>
  
  <pre><code>&lt;a rel="facebox" href="&lt;?php echo site_url('logincon/vieworders/');?&gt;"&gt;View Orders&lt;/a&gt;
  </code></pre>
  
  <p>I aim to pass it with specific id, like this code below which is not working in CI:</p>
  
  <pre><code>&lt;a rel="facebox" href="echo site_url('logincon/vieworders'))" id='.$row['reservation_id'].' title="Click To View Orders"&gt;View Orders&lt;/a&gt;
  </code></pre>
  
  <p>Which is which?</p>
  
  <p>Here's my codes:</p>
  
  <p>In my controller:</p>
  
  <pre><code>public function vieworders()
   {  
      // $this-&gt;data['date'] = $this-&gt;loginmod-&gt;getdate();
       $data['date'] = $this-&gt;loginmod-&gt;getdate();
       $data['name'] = $this-&gt;loginmod-&gt;getimage();
       $data['order'] = $this-&gt;loginmod-&gt;getorderdetail();
       $data['reservation'] = $this-&gt;loginmod-&gt;getdesign();
  
       $this-&gt;load-&gt;view('vieworders', $data);
  
   }
  </code></pre>
  
  <p>In my model:</p>
  
  <pre><code>public function getdate(){
  $q=$this-&gt;db-&gt;get('orders_date');
  if($q-&gt;num_rows()&gt;0){
  return $q-&gt;result_array();
  }
  }
  public function getimage() {
      $query = $this-&gt;db-&gt;get("image");
      if($query-&gt;num_rows()&gt;0){
      return $query-&gt;result_array();
  }
  }
  public function getorderdetail() {
      $query = $this-&gt;db-&gt;get("order_detail");
      if($query-&gt;num_rows()&gt;0){
      return $query-&gt;result_array();
  }
  }
  public function getdesign()
  {
      $query = $this-&gt;db-&gt;get('reservation');
      if($query-&gt;num_rows()&gt;0){
      return $query-&gt;result_array();
  }
  }
  </code></pre>
  
  <p>And in my view:</p>
  
  <pre><code>&lt;table cellpadding="1" cellspacing="1" id="resultTable"&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th  style="border-left: 1px solid #C1DAD7"&gt;Order Date &lt;/th&gt;
          &lt;th&gt;Photo size &lt;/th&gt;
          &lt;th&gt; Quantity &lt;/th&gt;
  
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
  &lt;tr class="record"&gt;
          &lt;?php foreach ($date as $da) { ?&gt;
           &lt;td&gt;&lt;div align="left"&gt;&lt;?php echo $da['date']; ?&gt;&lt;/div&gt;&lt;/td&gt;
          &lt;?php } ?&gt; 
  
          &lt;?php foreach ($name as $images) { ?&gt;
          &lt;td style="border-left: 1px solid #C1DAD7;"&gt;&lt;?php echo $images['name']; ?&gt; &lt;/td&gt;
          &lt;?php } ?&gt; 
  
          &lt;?php foreach ($order as $detail) { ?&gt;
          &lt;td&gt;&lt;?php
              echo $detail['quantity'];?&gt;&lt;/td&gt;    
          &lt;?php } ?&gt; 
  &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p></p>
  
  <p>The output of these, it shows all the date,name and quantity that are in the database. Thats my problem, I only want a single row or only one output each query.</p>