好的,所以我试图使用jQuery DataTable(DataTables.net)显示来自我的数据库的信息.我可以让它工作得很好,显示整个表'笔记',但我想只显示未读取的笔记.所以我需要以某种方式包含一个WHERE子句,但我不清楚最好的方法来解决这个问题.
这是我目前显示整个表格的方式:
// DB table to use
$table = 'Notes';
// Table's primary key
$primaryKey = 'CID';
// Array of database columns which should be read and sent back to DataTables.
// The `db` parameter represents the column name in the database, while the `dt`
// parameter represents the DataTables column identifier. In this case simple
// indexes
$columns = array(
array( 'db' => 'CID', 'dt' => 0 ),
array(
'db' => 'CID',
'dt' => 0,
'formatter' => function( …Run Code Online (Sandbox Code Playgroud)