2014-01-06 82 views
0

在我的WP数据库中,我想查找www.example.com的所有匹配项并删除.htm扩展名,但只有在它是专门的www.example.comMySQL-可以根据条件进行搜索和替换吗?

我试图更改所有www实例.example.com的/ page.htm到www.example.com/page

基本上我想执行:

UPDATE wp_posts SET post_content = REPLACE(post_content, '.htm','') WHERE (string that has .htm also includes www.example.com); 

可能吗?

+0

使用MATCH AGAINST – user1336827

回答

0
WHERE post_content LIKE 'www.example.com%'