批量查找替换/删除WordPress文章内容的方法
登录数据库,执行sql语句进行替换用到update语句进行更新wp_posts表里面的文章内容字段post_contentUPDATE wp_posts SET post_content = REPLACE(post_content, '查找内容', '替换内容') WHERE post_type = 'post';
修改function.php文件function.php是wordpress主题目录下的文件,在function.php后面加上一段代码即可,优点是不用登陆数据库。有两种代码可以达到替换的目的:1、以下代码,用到WordPress的操作数据敞亮$wpdb,加到function.php内容之后即可;
global $wpdb;$wpdb->query("UPDATE wp_posts SET post_content = replace( post_content, '旧内容文字', '新内容文字' )");
https://cloud.tencent.com/developer/article/1866955
<div class="mod-content__markdown" style="word-wrap: break-word; margin: 0px; padding: 0px; color: rgb(24, 24, 24); font-family: 'Pingfang SC', 'helvetica neuepingfang SC', 'helvetica neue', arial, 'hiragino sans gb', 'microsoft yahei ui', 'microsoft yahei', simsun, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><div style="word-wrap: break-word; margin: 0px; padding: 0px;"><div class="rno-markdown new-version rno-" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; font-weight: 400; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); -webkit-font-smoothing: antialiased; white-space: pre-wrap; font-family: 'pingfang SC', 'helvetica neue', arial, 'hiragino sans gb', 'microsoft yahei ui', 'microsoft yahei', simsun, sans-serif;"><h5 id="9dqs3" name="%E8%B5%B7%E5%9B%A0" style="word-wrap: break-word; margin: 0px; padding: 0px; font-size: 14px; box-sizing: border-box; list-style: inherit; color: rgb(0, 0, 0); font-weight: bold; line-height: 24px;"><strong style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: bold;">起因</strong></h5><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">手上有一个采集站点, 剩余3万的草稿, 原计划手动每日发布几十篇文章, 后来实在有些反人类, 干脆一次性全发布</p><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">如果使用wordpress自带的批量操作, 文章太多容易卡顿超时, 还是直接操作数据库来的快, 但是修改数据库存在一定风险, 因此建议提前做好备份 </p><h4 id="ftfqc" name="%E5%BC%80%E5%A7%8B" style="word-wrap: break-word; margin: 16px 0px 8px; padding: 0px; font-size: 14px; box-sizing: border-box; list-style: inherit; color: rgb(0, 0, 0); font-weight: bold; line-height: 24px;"><strong style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: bold;">开始</strong></h4><ol class="ol-level-0" style="word-wrap: break-word; margin: 0px 0px 16px; padding: 0px 0px 0px 6px; box-sizing: border-box; list-style: decimal inside inherit;"><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px; list-style: inherit; box-sizing: border-box;">第一步 备份数据库</li></ol><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">mysqldump -uroot -p 数据库名 >数据库地址和名称</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">比如:</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">mysqldump -uroot -p wordpress>/logs/wordpress_bak.mql</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">回车后提示输入密码, 输入后即可备份</p><ol class="ol-level-0" style="word-wrap: break-word; margin: 0px 0px 16px; padding: 0px 0px 0px 6px; box-sizing: border-box; list-style: decimal inside inherit;"><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px; list-style: inherit; box-sizing: border-box;">第二步 操作wordpress数据库</li></ol><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">进入mysql内部</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">mysql -uroot -p 密码</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">查看所有数据库</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">show datebase;</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">选择指定数据库</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">use wordpress;</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">查看<code style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; white-space: pre-wrap; word-break: break-all; display: inline-block; margin-left: 10px; margin-right: 10px; background-color: rgb(243, 245, 249); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px 12px; color: rgb(10, 191, 91); font-family: Consolas, 'Liberation Mono', Menlo, Courier, 'Microsoft Yahei', monospace; line-height: 20px;">wordpress</code>表</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">show tables;</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">查看<code style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; white-space: pre-wrap; word-break: break-all; display: inline-block; margin-left: 10px; margin-right: 10px; background-color: rgb(243, 245, 249); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px 12px; color: rgb(10, 191, 91); font-family: Consolas, 'Liberation Mono', Menlo, Courier, 'Microsoft Yahei', monospace; line-height: 20px;">wp-posts</code>表字段</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">desc wp-posts;</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">最后修改<code style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; white-space: pre-wrap; word-break: break-all; display: inline-block; margin-left: 10px; margin-right: 10px; background-color: rgb(243, 245, 249); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px 12px; color: rgb(10, 191, 91); font-family: Consolas, 'Liberation Mono', Menlo, Courier, 'Microsoft Yahei', monospace; line-height: 20px;">wp-posts</code>表中的<code style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; white-space: pre-wrap; word-break: break-all; display: inline-block; margin-left: 10px; margin-right: 10px; background-color: rgb(243, 245, 249); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px 12px; color: rgb(10, 191, 91); font-family: Consolas, 'Liberation Mono', Menlo, Courier, 'Microsoft Yahei', monospace; line-height: 20px;">post_status</code>字段(关键)</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">UPDATE `wp_posts` SET `post_status` ='publish' WHERE (`post_status`='draft');</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">这里我是将所有的草稿改成已发布</p><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">wordpress中的文章状态有以下几种:</p><ul class="ul-level-0" style="word-wrap: break-word; margin: 0px 0px 16px; padding: 0px; box-sizing: border-box; list-style: none;"><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px 0px 0px 18px; list-style: none; box-sizing: border-box; position: relative;">pending:待审</li><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px 0px 0px 18px; list-style: none; box-sizing: border-box; position: relative;">draft:草稿</li><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px 0px 0px 18px; list-style: none; box-sizing: border-box; position: relative;">auto-draft:自动保存的草稿</li><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px 0px 0px 18px; list-style: none; box-sizing: border-box; position: relative;">inherit:修订版本</li><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px 0px 0px 18px; list-style: none; box-sizing: border-box; position: relative;">trash:回收站</li><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px 0px 0px 18px; list-style: none; box-sizing: border-box; position: relative;">publish:已发布</li><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px 0px 0px 18px; list-style: none; box-sizing: border-box; position: relative;">future:定时</li><li style="word-wrap: break-word; margin: 0px 0px 4px; padding: 0px 0px 0px 18px; list-style: none; box-sizing: border-box; position: relative;">private:私有</li></ul><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">如果你有其他需求, 比如想将所有待审的文章全部改成草稿, 那么只需修改相应的关键字就行,如:</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">UPDATE `wp_posts` SET `post_status` ='draft' WHERE (`post_status`='pending');</code></pre></div></div><p style="word-wrap: break-word; margin: 0px 0px 8px; padding: 0px; box-sizing: border-box; list-style: inherit; min-height: 24px;">或者 你只想修改某一时间段内的文章, 那么可以加上时间条件,如:</p><div class="rno-markdown-code" qct-area="代码块-0-javascript" qct-exposure="" style="word-wrap: break-word; margin: 24px 0px; padding: 0px; box-sizing: border-box; list-style: inherit;"><div class="rno-markdown-code-toolbar" style="word-wrap: break-word; margin: 0px; padding: 6px 8px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 228, 233); background-color: rgb(255, 255, 255); display: flex; align-items: center; justify-content: space-between; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-toolbar-info" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; line-height: 22px; color: rgb(0, 0, 0); font-size: 12px; font-weight: 400; flex: 1 1 0px; max-width: 48%; white-space: nowrap;"><div class="rno-markdown-code-toolbar-item is-type" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit; font-weight: 500;">代码语言:</span>javascript</div><div class="rno-markdown-code-toolbar-item is-num" style="word-wrap: break-word; margin: 0px; padding: 0px 0px 0px 48px; box-sizing: border-box; list-style: inherit; position: relative; white-space: nowrap; align-items: center; display: inline-block; vertical-align: middle; font-weight: 500;"><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">代码</span>运行次数:0</div></div><div class="rno-markdown-code-toolbar-opt" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: flex; align-items: center;"><div class="rno-markdown-code-toolbar-opt-icon-btn" qct-exposure="" qct-click="" qct-area="运行" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; color: rgba(0, 0, 0, 0.901961); font-size: 12px; font-weight: 500; line-height: 22px;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.66666 10.9999L10.6667 7.99992L6.66666 4.99992V10.9999ZM7.99999 1.33325C4.31999 1.33325 1.33333 4.31992 1.33333 7.99992C1.33333 11.6799 4.31999 14.6666 7.99999 14.6666C11.68 14.6666 14.6667 11.6799 14.6667 7.99992C14.6667 4.31992 11.68 1.33325 7.99999 1.33325ZM7.99999 13.3333C5.05999 13.3333 2.66666 10.9399 2.66666 7.99992C2.66666 5.05992 5.05999 2.66659 7.99999 2.66659C10.94 2.66659 13.3333 5.05992 13.3333 7.99992C13.3333 10.9399 10.94 13.3333 7.99999 13.3333Z" fill="currentcolor"></path></svg><span class="is-m-hidden" style="word-wrap: break-word; box-sizing: border-box; list-style: inherit;">运行</span></div></div></div><div class="developer-code-block" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative;"><div class="rno-markdown-code-opt-float" qct-exposure="" qct-click="" qct-area="复制" style="word-wrap: break-word; margin: 0px; padding: 3px 8px; box-sizing: border-box; list-style: inherit; opacity: 0; -webkit-transform: translateY(2px); position: absolute; right: 12px; top: 12px; z-index: 1; display: flex; align-items: center; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; background-color: rgba(206, 206, 206, 0.6); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; background-position: initial initial; background-repeat: initial initial;"><div class="rno-markdown-code-icon-btn qa-r-editor-btn" style="word-wrap: break-word; margin: 0px; padding: 0px; box-sizing: border-box; list-style: inherit; position: relative; display: inline-flex; vertical-align: middle; border: none; background-color: transparent; cursor: pointer; text-align: center; align-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 500; line-height: 22px; color: rgb(255, 255, 255);"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 15.5V3.5H14.5V15.5H4.5ZM12.5 5.5H6.5V13.5H12.5V5.5ZM9.5 2.5H3.5V12.5H1.5V0.5H11.5V2.5H9.5Z" fill="currentcolor"></path></svg></div></div><pre class="prism-token token line-numbers language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; margin: 0px; padding: 1em 1em 1em 3.8em; color: rgb(204, 204, 204); background-color: rgb(80, 85, 107); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; min-height: 14px; position: relative; counter-reset: linenumber 0; background-position: initial initial; background-repeat: initial initial;"><code class="language-javascript" style="word-wrap: normal; box-sizing: border-box; list-style: inherit; display: block; margin-left: 0px; margin-right: 10px; background-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; padding: 0px; color: inherit; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; line-height: 1.5; word-break: normal; text-align: left; white-space: inherit; word-spacing: normal; tab-size: 4; min-height: 14px; position: relative; vertical-align: baseline; font-size: 14px; background-position: initial initial; background-repeat: initial initial;">UPDATE `wp_posts` SET `post_status` ='draft' WHERE `post_status`='pending' and `post_date` >='2020-05-01 00:00:00' and `post_date` < '2021-03-22 22:00:00:00';</code></pre></div></div></div></div></div><div class="mod-content__source" style="word-wrap: break-word; margin: 0px 0px 20px; padding: 12px 20px; background-color: rgb(244, 247, 251); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; box-sizing: border-box; display: flex; flex-flow: row; align-items: center; justify-content: space-between; position: relative; color: rgb(24, 24, 24); font-family: 'Pingfang SC', 'helvetica neuepingfang SC', 'helvetica neue', arial, 'hiragino sans gb', 'microsoft yahei ui', 'microsoft yahei', simsun, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><div class="mod-content__source-inner" style="word-wrap: break-word; margin: 0px; padding: 0px;"><div class="mod-content__source-title" style="word-wrap: break-word; margin: 0px; padding: 0px; font-weight: 500; font-size: 14px; line-height: 24px; color: rgb(24, 24, 24);">本文参与 <a href="https://cloud.tencent.com/developer/support-plan" target="_blank" style="word-wrap: break-word; text-decoration: none; color: rgb(0, 82, 217); cursor: pointer;">腾讯云自媒体同步曝光计划</a>,分享自微信公众号。</div></div></div>
DELETE FROM wp_posts
WHERE
wp_posts.post_type = 'post'
AND wp_posts.ID NOT IN (
SELECT DISTINCT wp_term_relationships.object_id
FROM wp_term_relationships
WHERE wp_term_relationships.term_taxonomy_id IN (8, 19, 1679, 2270, 407, 346, 10)
);
批量删除除了(指定版块)外的帖子
页:
[1]