Summary
The SQL below uses the MySQL INSERTstring function to replace part of a string. This can be done in one query, and not in two if necessary, but SQL will be less readable.
Demo
http://rextester.com/RTKA97873
SQL
UPDATE wp_posts
SET post_content =
INSERT(post_content,
LOCATE('?fullinfo=', post_content) + 10,
LOCATE('&', post_content, LOCATE('?fullinfo=', post_content) + 10)
- LOCATE('?fullinfo=', post_content) - 10,
SUBSTRING(
post_content,
LOCATE('&additional_development=', post_content) + 24,
LOCATE('&', post_content, LOCATE('&additional_development=', post_content) + 24)
- LOCATE('&additional_development=', post_content) - 24));
UPDATE wp_posts
SET post_content =
INSERT(post_content,
LOCATE('&additional_development=', post_content) + 24,
LOCATE('&', post_content, LOCATE('&additional_development=', post_content) + 24)
- LOCATE('&additional_development=', post_content) - 24,
'');
source
share