title: paging is not working for jquery datatable
body: <p>i am using jquery table to show table on a web page.The table is coming up properly but paging for the table and showing number of records and search options are not working for the table generated.All the records are populating at the load of the page.This is my code
  PHP code
      
  
  <pre><code>$qry = " SELECT AssetId,";
  $qry .= $data; 
  $qry .= " from Completedetails";
  
  mysql_select_db($database_finalkms, $finalkms);
  $query_getcolumns = $qry;
  $getcolumns = mysql_query($query_getcolumns, $finalkms) or die(mysql_error());
  $row_getcolumns = mysql_fetch_assoc($getcolumns);
  $totalRows_getcolumns = mysql_num_rows($getcolumns);
  
  if (($getcolumns)||(mysql_errno == 0))  
  {  
    echo "&lt;table width='50%' id='sample_2'&gt;&lt;thead&gt;&lt;tr&gt;";  
    if (mysql_num_rows($getcolumns)&gt;0)  
    {  
            //loop thru the field names to print the correct headers  
            $i = 0;  
            while ($i &lt; mysql_num_fields($getcolumns))  
            {  
         echo "&lt;th align='center'&gt;". mysql_field_name($getcolumns, $i) . "&lt;/th&gt;";  
         $i++;  
      }  
      echo "&lt;/tr&gt;&lt;/thead&gt;";  
  
      //display the data  
      while ($rows = mysql_fetch_array($getcolumns,MYSQL_ASSOC))  
      {  
        echo "&lt;tbody&gt;&lt;tr &gt;";  
        foreach ($rows as $data)  
        {  
          echo "&lt;td align='center'&gt;". $data . "&lt;/td&gt;";  
        }  
      }  
    }else{  
      echo "&lt;tr&gt;&lt;td colspan='" . ($i+1) . "'&gt;No Results found!&lt;/td&gt;&lt;/tr&gt;";  
    }  
    echo "&lt;/tbody&gt;&lt;/table&gt;";  
  }else{  
    echo "Error in running query :". mysql_error();  
  }  
  
  ?&gt;
  </code></pre>
  
  <p>Java Script</p>
  
  <pre><code>&lt;script&gt;
   jQuery(document).ready(function() {       
    // initiate layout and plugins
    $("#sample_2").dataTable({"bPaginate": true});
   });
  &lt;/script&gt;
  
  &lt;input name="hdnfld" id="hdnfld" type="hidden" value="&lt;?php echo $qry;?&gt;"/&gt;
  </code></pre>
  
  <p>Please help me in this regard.</p>