让我在 server_processing.php 上让它变得非常简单
$aColumns = array('is_active','CompanyName', 'email', 'phone_no', 'web_address','id' );
$sIndexColumn = "id";
$sTable = "inf_company";
还设置连接到 db 现在 jquery 函数是
"sAjaxSource": "server_processing.php",
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
// Bold the grade for all 'A' grade browsers
if ( aData[0] != 0 )
{
$('td:eq(0)', nRow).html( '<input type="checkbox" name="delid[]" value="'+ aData[5] +'" />' );
}
if ( aData[5] != 0 )
{
// $('td:eq(4)', nRow).html( '<b>A</b>' ); // You can add your link here!!
$('td:eq(5)', nRow).html( '<a href=addsubcat.php?id='+ aData[5] +'><img src="./images /edit.png" alt="edit"></a><a href="subcatList.php?del=1&id='+ aData[5] +' "><img src="./images/del.png" alt="delete"></a>' );
}
return nRow;
},
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "CompanyName",
"value": "NATIONAL" } );
}
很简单,我想搜索公司名称 National..但它不起作用