嗨,我正在使用 jquery 数据表插件将 mysql 数据加载到其中,到目前为止它运行良好,但是当记录更多时,数据表的加载速度相对较慢,所以现在我被困在这里,不知道必须做什么,所以可以任何人都可以帮助我这是我的代码
<?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> <a href=\"delete.php?code=$row[vouchno]\" onClick=\"return confirm('Confrim Delete?');\"><img src='images/delete.png'></a></td>";
echo "</tr>";
}
?>
</tbody>
</table>