// DB table to use
$table = 'members';
// Table's primary key
$primaryKey = 'UID';
$columns = array(
array( 'db' => 'UID', 'dt' => 0 ),
array( 'db' => 'Username', 'dt' => 1 ),
array( 'db' => 'Registered', 'dt' => 2 ),
array( 'db' => 'Activation', 'dt' => 3 ),
//array( 'db' => 'Online', 'dt' => 4 ),
array( 'db' => 'Email', 'dt' => 4 ),
array( 'db' => 'Country', 'dt' => 5 ),
array( 'db' => 'IP', 'dt' => 6 ),
array( 'db' => 'Suspended', 'dt' => 7 )
);
$column_query = "SELECT $columns FROM $table ORDER BY ASC $primaryKey";
$column_rs = $conn->execute($column_rs);
http://datatables.net/examples/data_sources/server_side.html - 在此之后。
我的桌子.....
<thead>
<tr>
<th>UID</th>
<th>Username</th>
<th>Joined</th>
<th>Activated</th>
<!-- <th>Online</th> -->
<th>Email</th>
<th>Country</th>
<th>IP</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
我不知道该怎么做,我在jQuery上太可怕了
尝试此操作时出现的错误。
我的ajax代码
$(document).ready(function() {
$('#a_members').dataTable( {
"processing": true,
"serverSide": true,
"ajax": "js_table.php"
} );
} );
我从来没有做过jquery,更不用说数据表相关的jquery。