How can I display data depending on a where clause?
This question has an accepted answers - jump to answer
majkellvz keep in mind I am new with datatables too so this may not be the cleanest way to do it but it worked for me. I used the ssp.class.php helper available here
with server side processing and using the server side script from this example
Named it getdata.php and configured the DB information then I changed the last few lines to look like this
require( 'ssp.class.php' );
$where = $_GET['where']."'%\\'".$_GET['statement']."\\'%'";
SSP::complex( $_GET, $sql_details, $table, $primaryKey, $columns, $where )
"where": "dbColumnName = 'something' AND dbColumn2 like",
This sent the query to the db as
SELECT * FROM dbColumns WHERE dbColumnName = 'something' AND dbColumn2 like '%\'whereValue\'%'
Hope it helps
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.