Pre-filter on PHP and ajax Datatables?

Pre-filter on PHP and ajax Datatables?

Lia_MarlianaLia_Marliana Posts: 1Questions: 1Answers: 0

I already made a table using DataTables, PHP, ajax from MySQL data.
This is the working code

There are millions of data, and each data table has some kind of code, the successful ones will have the initial SC-22-- and PG-22-****-****.

I want to pre-filter the data using this "SC-22" and "PC-22".
How to do that using this code?

$('#example').dataTable( {
"search": {"search": "Fred"}
} );

I've tried adding "search": {"search": "SC-22" or "PG-22"}, but I don't think that's the right way.
Can anyone help me with this?
Thank you.

Answers

Sign In or Register to comment.