【问题标题】:how to load mysql data faster into jquery datatable如何更快地将mysql数据加载到jquery数据表中
【发布时间】:2013-04-24 15:48:05
【问题描述】:

嗨,我正在使用 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>&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> 

【问题讨论】:

标签: php jquery html mysql datatables


【解决方案1】:

请查看here

如果您想进行服务器端处理,请单击here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-10-18
    • 2021-12-26
    • 1970-01-01
    • 2023-03-13
    • 2019-11-15
    • 2011-10-30
    • 2019-07-11
    • 2018-04-07
    相关资源
    最近更新 更多