Error when searching custom column
Error when searching custom column
![an_najib](https://secure.gravatar.com/avatar/6f598f1cf72895e02790774ea42d30c1/?default=https%3A%2F%2Fvanillicon.com%2F6f598f1cf72895e02790774ea42d30c1_200.png&rating=g&size=120)
my problem is similar to:
https://datatables.net/forums/discussion/67092/error-when-searching-one-of-the-columns-in-datatable-serverside-true
When I want to get Age, I do this:
Defendant::select('*', DB::raw('TIMESTAMPDIFF(YEAR, birthdate, crime_time) AS age'))
And what Datatables Search protocol do is search column Age as it is there's column Age in my table.
LOWER('defendants`.`age`) LIKE %d%
I wonder If there is solution to my problem, Thanks...
Answers
At this time, the only want to handle that would be to create a VIEW that the server-side libraries could query.
This is something that needs to be improved - thanks for flagging it up again. I don't have an immediate action plan to address it, but I am aware that it needs to be improved.
Allan