How to show certain rows only in serverside processing?

How to show certain rows only in serverside processing?

minojac135minojac135 Posts: 1Questions: 1Answers: 0

I would like to show only certain rows to logged in users where "column_name" = "some_value" in serverside-processing. Currently i use following code below.

$table = 'tablename';
$primaryKey = 'id';
$columns = array(
array( 'db' => 'id', 'dt' => 0 ),
array( 'db' => 'name', 'dt' => 1 ), // need to only select 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 )
);

I need to achieve this in server side selecting particular rows.

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    It would probably be easier to use the server-side script provided with Editor - as that supports where conditions (see here). This blog post discusses how to use it when not using Editor.

    Colin

This discussion has been closed.