MYSQL,批量更新新文本链接,简短描述了woo commerce singe shop page

时间:2017-02-26 08:37:01

标签: mysql

screenshot of the link

嗨,我已经发布了数百种产品,在一个woocommerce商店的简短描述(产品摘录)中有一个链接。

现在想用新链接更新该链接。

哪个SQL是正确的?

UPDATE wp_posts SET post_content = REPLACE (post_content,‘href="http://xxx/about">Ordering</a>?‘,
‘href="http://xxxx/ordering guid">Ordering</a>?‘);

UPDATE wp_posts SET post_excerpt = REPLACE (post_excerpt,‘href="http://xxx/about">Ordering</a>?‘,
‘href="http://xxx/ordering guid">Ordering</a>?‘);

还是其他什么?

1 个答案:

答案 0 :(得分:0)

您可以使用WP数据库中的Search And Replace任何内容。也许下面的脚本可以帮助你。

以下是链接Database Search and Replace Script in PHP

  

注意:此脚本仅适用于Wordpress数据库。