Search issue when using mysql group_concat()
Search issue when using mysql group_concat()

Hi folks,
Table A :
- id
- firstname
- lastname
- dob
Now, in MYSQL is use group_concat('firstname', ' ', 'lastname') as Name.
Here, in frontend i am able to see firstname and lastname together, but while searching it will only search firstname but NOT lastname, infact if I search only lastname it will NOT search.
In my column definition I have to pass firstname like
['data' => 'Name', 'name' => 'firstname'],
I can't contact firstname and lastname together.
I have LAST option (which i want to avoid) is to make VIEWS.
Please help.
Thanks,
Rahul Bohra
Answers
Hi @rahulbohra ,
Are you using Editor? If not, do you have
serverSide
enabled? It would help if you could link to your page or post your table initialisation code.Cheers,
Colin
Hi @collin ,
I got the solution by myself. Thanks for your reply.
Solution
// allows use of pipes as CONCAT function in SQL
SET SESSION sql_mode = 'PIPES_AS_CONCAT';
and in Column definition
['data' => 'Name', 'name' => "(firstname ||' '|| lastname)"]
Answer to your question I am not using EDITOR and my server side is enable