gpt4 book ai didi

php - 更新 wp-post 表列字符串部分

转载 作者:行者123 更新时间:2023-11-29 18:46:26 24 4
gpt4 key购买 nike

我在 WordPress 数据库的 wp-post 表中有以下数据,需要将 http 条目更新为 https。我尝试过以下查询,但没有影响。

UPDATE CwwNResoposts
SET post_content = ( Replace (post_content, 'href="https:', 'href="http:') )

列条目:

This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:

<blockquote>Hi there! I'm a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi&#241;a coladas. (And gettin' caught in the rain.)</blockquote>

...or something like this:

<blockquote>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</blockquote>

As a new WordPress user, you should go to <a href="http://veezphone.com/wp-admin/">your dashboard</a> to delete this page and create new pages for your content. Have fun!

最佳答案

您需要交换替换查询,

UPDATE CwwNResoposts
SET post_content = ( Replace (post_content, 'href="http:', 'href="https:') );

检查替换查询格式:REPLACE(str, find_string, Replace_with)

关于php - 更新 wp-post 表列字符串部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44603484/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com