Forum Replies Created

Viewing 1 replies (of 1 total)
  • Haven’t tried this yet but look forward to getting to it later today. My buddy suggested this code to search and replace link broken by UAM:

    UPDATE wp_posts SET post_excerpt=guid WHERE EXISTS (SELECT *? FROM wp_posts WHERE post_content LIKE ‘%getfile%’ )

    This selects all the post_content rows that contain the word “getfile” and replaces the entire post_content field with the entire guid field.?

    I notice that there are syntax differences between the two fields, but rather than assume you wanted one over the other, the syntax above just moves the guid into post_content – if you want additional html, for example the <a href=" and ">Link Description</a>,? you can add them to the SET statement, for example:

    UPDATE wp_posts SET post_excerpt=<a href="+guid+">Link Description</a> WHERE EXISTS …

Viewing 1 replies (of 1 total)