title: num_rows() function is not working for MSSQL in codeigniter
body: <p>I m using codeigniter with MSSQL db. to get a number of records from a query I m using <strong>$query->num_rows()</strong>. but its not working. If I use MYSQL DB then its working fine. My code is - </p>
  
  <pre><code>function getCountry(){
  
          $this-&gt;db-&gt;distinct();
          $this-&gt;db-&gt;select('CM_CHANNEL_TELCAS_DETAIL.CTD_CNTRY_CODE as CNTRY_CODE, CM_COUNTRY.CC_CNTRY_NAME as CNTRY_NAME');
          $this-&gt;db-&gt;from('CM_CHANNEL_TELCAS_DETAIL');
          $this-&gt;db-&gt;join('CM_COUNTRY','CM_CHANNEL_TELCAS_DETAIL.CTD_CNTRY_CODE = CM_COUNTRY.CC_CNTRY_CODE','inner');
  
          $query = $this-&gt;db-&gt;get();
  
          if($query -&gt; num_rows() &gt; 0){    
          return $query-&gt;result();
          }else{
            return false;
          }
  }
  </code></pre>
  
  <p>If I write above code like this then It gives the results -</p>
  
  <pre><code>function getCountry(){
  
          $this-&gt;db-&gt;distinct();
          $this-&gt;db-&gt;select('CM_CHANNEL_TELCAS_DETAIL.CTD_CNTRY_CODE as CNTRY_CODE, CM_COUNTRY.CC_CNTRY_NAME as CNTRY_NAME');
          $this-&gt;db-&gt;from('CM_CHANNEL_TELCAS_DETAIL');
          $this-&gt;db-&gt;join('CM_COUNTRY','CM_CHANNEL_TELCAS_DETAIL.CTD_CNTRY_CODE = CM_COUNTRY.CC_CNTRY_CODE','inner');
  
          $query = $this-&gt;db-&gt;get();
  
          return $query-&gt;result();
  }
  </code></pre>
  
  <p>I tried to echo <strong><em>$query->num_rows()</em></strong> value. but its not giving any value. 
  Please help me to resolve this issue.</p>
  
  <p>Thanks in Advance. </p>