SELECT str_result,
@key:=',key=',@i:=LOCATE(@key,str_result)+length(@key),@len:=LOCATE(',',str_result,LOCATE(@key,str_result)+1) -@i,
substr(
stat_result,
@i
,@len
)
FROM t_table
SELECT str_result,
@key:=',key=',@i:=LOCATE(@key,str_result)+length(@key),@len:=LOCATE(',',str_result,LOCATE(@key,str_result)+1) -@i,
substr(
stat_result,
@i
,@len
)
FROM t_table