是否可以使用 PHP 编写数据表?
Is it possible to code a DataTable using PHP?
当在线搜索所有教程等都使用 ajax 时,我不太适应,所以只是想知道是否有一种方法可以只使用 PHP 来编写数据表 &如果是这样,有人有链接让我浏览吗?
When searching online all tutorials etc are using ajax, which I'm not to comfortable with so just wondering if there is a way of just using PHP to code a datatable & if so does anyone have a link for me to look through?
谢谢
尽管我完全同意您问题下方的评论!作为一种快速解决方法(没有学习曲线!)如果您的表格包含少于 10.000 行,您可以像您一样在 for/while 循环中简单地生成一个简单的 HTML 表格对于一个简单的表.然后像这样将表的 ID 传递给数据表:
Even though I totally agree with comments below your question! as a quick workaround (with no learning curve!) if your tables contain less than 10.000 rows you may simply generate a simple HTML table in a for / while loop as you would for a simple table. Then pass your table's ID to datatable like this:
$(document).ready(function() {
$('#example').DataTable();
});
但毕竟,AJAX 的创建是为了让世界对我们更美好.:-)
But after all, AJAX is created to make world a better place for us. :-)
这篇关于使用 PHP 的数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
PHP、MySQL PDOException 的死锁异常代码?Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死锁异常代码?)
PHP PDO MySQL 可滚动游标不起作用PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滚动游标不起作用)
PHP PDO ODBC 连接PHP PDO ODBC connection(PHP PDO ODBC 连接)
使用 PDO::FETCH_CLASS 和魔术方法Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔术方法)
php pdo 只从 mysql 获取一个值;等于变量的值php pdo get only one value from mysql; value that equals to variable(php pdo 只从 mysql 获取一个值;等于变量的值)
MSSQL PDO 找不到驱动程序MSSQL PDO could not find driver(MSSQL PDO 找不到驱动程序)