mysql - Number of elements in Group_Concat -
is there way counts of elements in group_concat? e.g when tried
select c.postcode , c.customerid , e.engforename , e.engsurname , j.jobbookeddate , p.conumber , j.type , group_concat(s.serialnumber) , group_concat(fk_jbleid) ...
all need number of elements in group_concat.
try this
select *, length(c1) - length(replace(c1, ',', ''))+1 count_fk_jbleid, length(c2) - length(replace(c2, ',', ''))+1 count_fk_jbleid ( select c.postcode , c.customerid , e.engforename , e.engsurname , j.jobbookeddate , p.conumber , j.type , group_concat(s.serialnumber) c1 , group_concat(fk_jbleid) c2 table1 ) t
Comments
Post a Comment