嗨,我已经发布了数百种产品,在一个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>?‘);
还是其他什么?
答案 0 :(得分:0)
您可以使用WP数据库中的Search And Replace
任何内容。也许下面的脚本可以帮助你。
以下是链接Database Search and Replace Script in PHP
注意:此脚本仅适用于
Wordpress
数据库。