livewire-datatables
livewire-datatables copied to clipboard
Problem with mysql "IN (...)" when using Column::raw
Hi,
I tried to use mysql "IN" with Column::raw().
The above mysql query is working properly when using it with DB::select() but doesn't work when used in Column::raw()
SELECT * FROM functions WHERE function_sub_group_id IN
(SELECT id FROM function_sub_groups WHERE function_group = function_group.id)
See the error on Flare : https://flareapp.io/share/95JLqEDP#F92
Do you know how can I deal with it ? Thx
To explain, I've 3 tables which represent 3 levels :
Table Functions :
- id
- function_sub_group_id
Table Function Sub Group :
- id
- function_group_id
Table Function Group :
- id
Here, we are in the FunctionGroups datatable, and I want a sortable column where we find a count of the functions attached to it.
Maybe someting like NumberColumn::name('function_sub_groups.functions.id:count')