Php 如何仅在服务器端处理中显示某些行?
我只想向登录用户显示某些行,其中服务器端处理中的“column_name”=“some_value”。目前我使用下面的代码Php 如何仅在服务器端处理中显示某些行?,php,datatables,Php,Datatables,我只想向登录用户显示某些行,其中服务器端处理中的“column_name”=“some_value”。目前我使用下面的代码 $table = 'tablename'; $primaryKey = 'id'; $columns = array( array( 'db' => 'id', 'dt' => 0 ), array( 'db' => 'name', 'dt' => 1 ), // need to only select where name ="exam
$table = 'tablename';
$primaryKey = 'id';
$columns = array(
array( 'db' => 'id', 'dt' => 0 ),
array( 'db' => 'name', 'dt' => 1 ), // need to only select where name ="example"
array( 'db' => 'views', 'dt' => 2 )
);
}
$sql_details = array(
'user' => 'db_user',
'pass' => 'db_pass',
'db' => 'db_name',
'host' => 'localhost:3306'
);
require( 'server-processing.php' );
echo json_encode(
SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
);
如何实现这一点?我们可以使用
SSP::complex( $_GET, $sql_details, $table, $primaryKey, $columns , "column_name = 'some_value'" )
使用complex
代替simple
,然后在括号内额外添加“column\u name='some\u value'