Error when searching custom column

Error when searching custom column

an_najiban_najib Posts: 1Questions: 1Answers: 0

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

  • allanallan Posts: 63,514Questions: 1Answers: 10,472 Site admin

    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

Sign In or Register to comment.