sql - MYSQL SELECT multiple values between "" in Column -
i have column returns
a:2:{i:0;s:10:"properties";i:1;s:14:"movable assets";} i homecoming only:
properties, movable assets how can utilize select statement retrieve values between " symbols
use substring_index().
substring_index() takes string argument followed delimiter character , number of parts return. after break string using delimiter, number of parts returned single string.
select concat( substring_index( substring_index( substring_index( 'a:2:{i:0;s:10:"properties";i:1;s:14:"movable assets";}', '"', 4 ), '"', 2 ), '"', -1 ), ",", substring_index( substring_index( substring_index( 'a:2:{i:0;s:10:"properties";i:1;s:14:"movable assets";}', '"', 4 ), '"', 4 ), '"', -1 ) ); mysql sql
No comments:
Post a Comment