测试包中缺失了了数据库操作类mysql.php;
测试包中缺失了了数据库操作类mysql.php;
v10258
Posts: 8Questions: 0Answers: 0
您好,1.9.3测试包中少了数据库操作类mysql.php;
examples/server_side/scripts文件夹中的php页面引入了此类
原代码:
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php"
examples/server_side/scripts文件夹中的php页面引入了此类
原代码:
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php"
This discussion has been closed.
Replies
examples / server_side / scripts folder in php page to introduce such
Original code:
include ($ _SERVER ['DOCUMENT_ROOT']. "/ datatables / mysql.php"
> REMOVE THIS LINE (it just includes my SQL connection user/pass)
So just remove it :-)
Allan
This seems to not work;
about the post.html--post.php
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/post.php",
"sServerMethod": "POST"
} );
} );
<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Easy set variables
*/
/* Array of database columns which should be read and sent back to DataTables. Use a space where
* you want to insert a non-database field (for example a counter or static image)
*/
$aColumns = array( 'engine', 'browser', 'platform', 'version', 'grade' );
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "id";
/* DB table to use */
$sTable = "ajax";
/* Database connection information */
$gaSql['user'] = "root";
$gaSql['password'] = "";
$gaSql['db'] = "datatable";
$gaSql['server'] = "localhost";
/* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
//include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
I made a low-level error.
In my mysql the primary key is 'Uid'.
Thank you for your answer.