title: my query in codeigniter cannot produce result
body: <p>i've been debbuging it many times based on my knowledge, i am new to codeigniter, any solution idea would be much appreciated... ty</p>
  
  <p>here's my code</p>
  
  <p>MODEL:</p>
  
  <pre><code>function userdisplay_info($id){
  
          $result = $this-&gt;db-&gt;query("SELECT uid FROM user WHERE         userIdentificationNumber LIKE '$id'");                                 
        //if($result-&gt;num_rows() &gt; 0){
  
          $info_data = $result-&gt;result();
  
          $row = $info_data[0];
  
  
          $result-&gt;free_result();
       }
  </code></pre>
  
  <p>CONTROLLER:</p>
  
  <pre><code>function r_book(){
  
      $data = array();
      $bid = $this-&gt;input-&gt;post('bid');
      $u_id = $this-&gt;input-&gt;post('userinputid');
  
      $data = array(
  
          'book_reserved' =&gt; 1
  
          );
  
      if($this-&gt;module2-&gt;reserved_book($bid,$data))
          {
  
  
  
              $data['info'] = $this-&gt;module2-&gt;userdisplay_info($u_id);
  
              $this-&gt;load-&gt;view('User/template/header');
              $this-&gt;load-&gt;view('User/template/navigator');
              $this-&gt;load-&gt;view('User/landingpage',$data);
              $this-&gt;load-&gt;view('User/template/footer');
              return true;
          }else
              {
                  $this-&gt;load-&gt;view('User/template/header');
                  $this-&gt;load-&gt;view('User/template/navigator');
                  $this-&gt;load-&gt;view('User/landingpagefail');
                  $this-&gt;load-&gt;view('User/template/footer');
                  return false;   
              }
  
      }
  </code></pre>
  
  <p>VIEW:</p>
  
  <pre><code>          &lt;div class="col-md-3"&gt;
              &lt;div class="panel panel-default"&gt;
                  &lt;div class="panel-body"&gt;
                  &lt;?php if($info) : foreach($info as $u_info) : ?&gt;
                      &lt;ul class="list-unstyled"&gt;
                          &lt;li&gt;Last Name : &lt;?php echo $u_info-&gt;uid; ?&gt;&lt;/li&gt;
                          &lt;li&gt;First Name : &lt;?php echo $u_info-&gt;userFirstname; ?&gt;&lt;/li&gt;&lt;/li&gt;
                          &lt;li&gt;Middle Name : &lt;?php echo $u_info-&gt;userMiddlename; ?&gt;&lt;/li&gt;&lt;/li&gt;
                          &lt;li&gt;Course : &lt;?php echo $u_info-&gt;userCourse; ?&gt;&lt;/li&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                      &lt;?php endforeach; ?&gt;
                  &lt;?php else :?&gt;
                  &lt;h4&gt; No Record Found&lt;/h4&gt;
                  &lt;?php endif; ?&gt;
                  &lt;/div&gt;
              &lt;/div&gt; 
      &lt;/div&gt;
  </code></pre>