how search in filtered data from mysql(not raw data in sql)
how search in filtered data from mysql(not raw data in sql)

hello all
im using datatable for sometime and im pretty happy with it
only problem i have i use datatable Server-side processing
and for example i save date in mysql with timestamp not 2009/10/15
so when users use search in datatable its not work when they type 2009
and my php code is like this
array(
'db' => 'time_stamp',
'dt' => 'time_stamp',
'formatter' => function ( $d, $row ) {
return date('Y/m/d G:i',$d);
}
)
there is anyway i can fix this? also there is way to do range search?
This discussion has been closed.
Answers
2009
should work as a search term, but2009/10
will not. Unfortunately, this is the downside to using server-side processing.There are three ways to handle it:
DATE_FORMAT
(or similar).2 is probably the best option - but also the slowest since it needs the server to render all rows to then be able to apply the condition to them. It will also need a modification to the SSP script since it doesn't currently allow for function class like that.
Sorry I don't have a better answer for you atm.
Regards,
Allan