How to use 'WHERE' clause using ssp.class.php DataTables

前端 未结 4 1540
独厮守ぢ
独厮守ぢ 2021-02-01 07:36

Okay so i\'m trying to display information from my database using jQuery DataTable (DataTables.net). I can get it to work fine displaying the entire table \'notes\' but I would

4条回答
  •  执念已碎
    2021-02-01 08:01

    You should change DataTables default functions to do this!

    use this ssp.class.php customized class

    Link

    Use it like following example:

    require( 'ssp.class.php' );
    $where = "Status ='Unread'";
    echo json_encode(
        SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns,$where )
    );
    

    If you set $where parameter, Custom class will add where clause to select statement!

    Update :

    DataTables in 2015 add complex method

    The new built-in method can set where clause in query!

提交回复
热议问题