2014-01-06 106 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%'