title: Search, pagination and sorting not working in datatable
body: <p>Currently, I am working on my datatable to display the detail from the database. I am using the php myadmin for the database. But it only manage to display the detail only but not the pagination, sorting and searching is not working. I have followed some other tutorials but it still doesn't work.</p>
  
  <pre><code>&lt;?php  
  $conn = mysqli_connect("localhost", "root", "", "jiaen"); 
  $sql = "SELECT * FROM stock LEFT OUTER JOIN category ON stock.categoryid=category.categoryid order by stockCode";
  
  //Execute connection
  $result = mysqli_query($conn,$sql); 
  ?&gt;  
  &lt;!DOCTYPE html&gt;  
  &lt;html&gt;  
  &lt;head&gt;  
     &lt;title&gt;Webslesson Tutorial | Datatables Jquery Plugin with Php MySql and Bootstrap&lt;/title&gt;  
     &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"&gt;&lt;/script&gt;  
     &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /&gt;  
     &lt;script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"&gt;&lt;/script&gt;  
     &lt;script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"&gt;&lt;/script&gt;            
     &lt;link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" /&gt;  
     &lt;/script&gt;
  &lt;/head&gt;  
  &lt;body&gt;  
    &lt;br /&gt;&lt;br /&gt;  
    &lt;div class="container"&gt;  
        &lt;h3 align="center"&gt;Datatables Jquery Plugin with Php MySql and Bootstrap&lt;/h3&gt;  
        &lt;br /&gt;  
        &lt;div class="table-responsive"&gt;  
             &lt;table id="stock" class="table table-striped table-bordered" &gt; 
                &lt;thead&gt;  
                   &lt;tr&gt;  
                      &lt;td&gt;Stock Code&lt;/td&gt;  
                      &lt;td&gt;Stock Name&lt;/td&gt; 
                       &lt;td&gt;Stock Category&lt;/td&gt;  
                      &lt;td&gt;Quantity&lt;/td&gt;  
                      &lt;td&gt;Price (RM)&lt;/td&gt;  
                      &lt;td&gt;Action&lt;/td&gt;  
                   &lt;/tr&gt;  
                &lt;/thead&gt; 
                &lt;tbody&gt;  
                &lt;?php  
                while($row = mysqli_fetch_array($result))  
                {  
                   echo '  
  
                   &lt;tr&gt;  
                      &lt;td&gt;'.$row["stockCode"].'&lt;/td&gt;  
                      &lt;td&gt;'.$row["stockName"].'&lt;/td&gt;  
                      &lt;td&gt;'.$row["categoryName"].'&lt;/td&gt;  
                      &lt;td&gt;'.$row["quantity"].'&lt;/td&gt;  
                      &lt;td&gt;'.$row["price"].'&lt;/td&gt;
                      &lt;td&gt;&lt;a href = "add.php?id='.$row["stockCode"].'"&gt;Stock In&lt;/a&gt;&lt;/td&gt; 
                      &lt;td&gt;&lt;a href = "rnd.php?id='.$row["stockCode"].'"&gt;R&amp;D&lt;/a&gt;&lt;/td&gt; 
                      &lt;td&gt;&lt;a href = "remarkstock.php?id='.$row["stockCode"].'"&gt;Remark Stock&lt;/a&gt;&lt;/td&gt; 
                      &lt;td&gt;&lt;a href = "modify.php?id='.$row["stockCode"].'"&gt;Modify&lt;/a&gt;&lt;/td&gt; 
                      &lt;td&gt;&lt;a href = "delete.php?id='.$row["stockCode"].'"&gt;Delete&lt;/a&gt;&lt;/td&gt;   
                   &lt;/tr&gt; 
  
                   ';  
                }  
                ?&gt;  
                &lt;/tbody&gt; 
             &lt;/table&gt;  
  
        &lt;/div&gt;  
    &lt;/div&gt; 
  
    //Javascript part for datatable  
    &lt;script&gt;  
    $(document).ready(function() {
        $('#stock').DataTable();
    } );
    &lt;/script&gt;
  &lt;/body&gt;  
  &lt;/html&gt;  
  </code></pre>