I have a simple CMS running PHP/MySQL and I’m looking for the most efficient way to update LONGTEXT fields across multiple tables when I change the title/url for a page.
For example:
I change the page “/contact” to “/contact-us” and I want any LONGTEXT fields across multiple tables containing
...<a href="/contact">...
to update to
...<a href="/contact-us>"...
I know I could just do a SELECT, match records and replace, but I’m thinking there has to be some method that’s lighter on the MySQL…
I found this:
Which appears to do exactly what I’m looking for.