lundi 11 novembre 2019

GROUP_CONCAT (CONCAT… in Laravel

I don't know if anyone can help me needed to execute this query in laravel but I don't know how to use GROUP_CONCAT with CONCAT inside?

select dictionaries.name  , GROUP_CONCAT(CONCAT('{name:"', dictionary_files.name, '", file:"',dictionary_files.path,'"}')) as files
 from dictionaries  join dictionary_files on dictionaries.`id` = dictionary_files.`dictionary_id` Where dictionary_files.name Like "Teste%" Group by dictionaries.name

Thanks.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire