show depending on a where clause
show depending on a where clause
majkellvz
Posts: 8Questions: 3Answers: 0
How can I display data depending on a where clause?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
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
https://github.com/DataTables/DataTables/blob/master/examples/server_side/scripts/ssp.class.php
with server side processing and using the server side script from this example
https://datatables.net/examples/data_sources/server_side
Named it getdata.php and configured the DB information then I changed the last few lines to look like this
and then the javascript for the table looks like this
This sent the query to the db as
SELECT * FROM dbColumns WHERE dbColumnName = 'something' AND dbColumn2 like '%\'whereValue\'%'
Hope it helps