I have a few thousand MySQL records that contain strings of text saved in a MySQL database that contain unique values after a URL variable called "additional_development" with data like 'Chestnut%20Estates' in each record:
<a class="button" href="http://www.websitedomain.com/search-results/?fullinfo=&Location=all&additional_development=Chestnut%20Estates&additional_postal_code=
They dynamic value is always in the &additional_development= variable. If there is no value here it simply looks like this additional_development=&additional_postal_code=
I need to remove the dynamic text from this location to the ?fullinfo=
variable without knowing the contents (Chestnut Estates) to move, only the location of where this value resides in the URL.
Desired Effect:
<a class="button" href="http://www.websitedomain.com/?fullinfo=Chestnut%20Estates&Location=all&additional_development=&additional_postal_code=
Using this question, I found I could not do this with regex. So I've attempted different degrees of Update commands with still no effect.
Any suggestions on the best way to achieve the desired result in a MySQL query?
Table name is wp_posts and column name is post_content.