0

hi i am using jquery datatable plugin to load mysql data into it so far its goin good but when the records are more the data table gets relatively slow to load so now i am stuck here and have no idea of what has to be done so can anyone help me in this here is my code

<?php
$result = mysql_query("SELECT * FROM `mdb` ORDER BY grno");
?>
$(document).ready(function(){
    $('#datatables').dataTable({
        "sPaginationType":"full_numbers",
        "aaSorting":[[2, "desc"]],
        "bJQueryUI":true
    });
})

<table id="datatables" class="display">
    <thead>
        <tr>
           <th>Srno.</th>
           <th>Brno.</th>
           <th>Name</th>
           <th>Address</th>
           <th>City</th>
           <th>Pin</th>
           <th>Mobile</th>
           <th>Actions</th>

        </tr>
    </thead>
    <tbody>
        <?php
           while ($row = mysql_fetch_array($result)) {
               echo "<tr>";
               echo "<td align='center'>$row[grno]</td>";
               echo "<td align='center'>$row[brno]</td>";
               echo "<td align='center'>$row[name]</td>";
               echo "<td align='center'>$row[address]</td>";
               echo "<td align='center'>$row[city]</td>";
               echo "<td align='center'>$row[pin]</td>";
               echo "<td align='center'>$row[mobile]</td>";
               echo "<td><a href=\"entry.php?vouchno=$row[vouchno]\"><img src='images/edit.png'></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"delete.php?code=$row[vouchno]\" onClick=\"return confirm('Confrim Delete?');\"><img src='images/delete.png'></a></td>";
               echo "</tr>";
           }
           ?>
    </tbody>
</table> 
1

1 Answer 1

2

Please have a look at here.

If you want to have server-side processing click here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.