SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table test ( html text ); insert into test values ('text before <h4 class="notify__title notify__title--small">тут всегда разное название</h4> text after' ); select locate('<h4 class="notify__title notify__title--small">', html, 1) as o, locate('</h4>', html, locate('<h4 class="notify__title notify__title--small">', html, 1)) as c, concat('\s<span>', substr( html, locate('<h4 class="notify__title notify__title--small">', html, 1) + 47, locate('</h4>', html, locate('<h4 class="notify__title notify__title--small">', html, 1))-locate('<h4 class="notify__title notify__title--small">', html, 1) - 47 ), '</span>') as new_html from test;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear