You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Help to get out of this issue.
I'm using individual column search, the filter column is not working with DB::raw.
These are the versions
"yajra/laravel-datatables": "9.0",
"yajra/laravel-datatables-oracle": "^10.0"
The text was updated successfully, but these errors were encountered:
Afaik, having SQL count is not supported by the framework inside a nested where clause.
Workaround, include the having SQL on the query() method.
I'm facing problems with raw queries only.
filter column is from datatable method and raw queries from the query method
please note I'm using individual column searching
DB::raw("CASE WHEN bookings.payment_status = 1 THEN 'Paid' ELSE 'Unpaid' END AS payment_status")
->filterColumn('payment_status', function($query, $keyword) {
$keywords = trim($keyword);
$query->whereRaw("CASE WHEN bookings.payment_status = 1 THEN 'Paid' ELSE 'Unpaid' END LIKE ?", ["%{$keywords}%"]);
})
DB::raw("CONCAT(makes.title,' ',make_models.title) AS car"),
->filterColumn('car', function($query, $keyword) {
$keywords = trim($keyword);
$query->whereRaw("CONCAT(makes.title,' ',make_models.title) like ?", ["%{$keywords}%"]);
})
Help to get out of this issue.
I'm using individual column search, the filter column is not working with DB::raw.
These are the versions
"yajra/laravel-datatables": "9.0",
"yajra/laravel-datatables-oracle": "^10.0"
The text was updated successfully, but these errors were encountered: