更新时间:2023-02-11 19:29:59
当然,这对于jquery-dataTables来说很酷.
Of course, this is the cool thing with jquery-dataTables.
看这个例子(针对PHP和MySQL).服务器端数据具有排序和分页
Look at this example (targeted at PHP and MySQL).Server sided Data with sorting and pagination
开箱即用.您要做的是在此PHP行中输入MySQL字段:
This works out of the box. A you have to do is to enter your MySQL fields into this PHP line:
$aColumns = array( 'engine', 'browser', 'platform', 'version', 'grade' );
如果您正在使用Node/mongoDB或任何其他服务器端脚本,则必须编写自己的代码. 但基本上:
If you are using Node/mongoDB or any other server sided script you will have to write your own code. But basically:
echo json_encode( $output );
中的PHP/MySql中.在node/mongo中,只是查询的结果.echo json_encode( $output );
. In node/mongo just the result of your query.