欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來(lái)到入門教程網(wǎng)!

dedecms

當(dāng)前位置:主頁(yè) > CMS教程 > dedecms >

織夢(mèng)SQL命令行工具常用操作代碼

來(lái)源:本站原創(chuàng)|時(shí)間:2021-08-05|欄目:dedecms|點(diǎn)擊: 次

如果一個(gè)織夢(mèng)系統(tǒng)的網(wǎng)站,里面的信息非常多時(shí)候,如何能批量修改文章信息呢,可以使用織夢(mèng)sql命令行工具來(lái)實(shí)現(xiàn)批量操作。

sql命令注解:

update (表名) set (要修改的 字段名+修改后的 賦值) where (篩選條件)

update:是一個(gè)數(shù)據(jù)庫(kù)sql語(yǔ)法用語(yǔ),用途是更新表中原有數(shù)據(jù)

where:篩選條件,指你要修改哪些數(shù)據(jù)內(nèi)容,用條件語(yǔ)句篩選提取指定內(nèi)容

織夢(mèng)常用的更改SQL命令:

織夢(mèng)sql命令批量更改列表頁(yè)模板:

update dede_arctype set templist = replace(templist,"{style}/list_qz.htm",'{style}/oz_ongpage.htm') where id in (29,20,31,35,36,37,38,40,41,42,43,44,45,46,47)

織夢(mèng)sql命令批量更改文章頁(yè)模板:

update dede_archives set set temparticle = replace(temparticle,"{style}/article_article_xb.htm",'{style}/article_article.htm');

織夢(mèng)sql命令批量更改文章命名規(guī)則:

update `dede_arctype` set namerule='{typedir}/{aid}.html';

注:把站內(nèi)所有文章模型命名規(guī)則全部替換成{typedir}/{aid}.html這樣一種形式

織夢(mèng)sql命令批量更改文章點(diǎn)擊數(shù):

織夢(mèng)文章可以通過(guò)系統(tǒng)設(shè)置》其他選項(xiàng)》文檔默認(rèn)點(diǎn)擊數(shù),修改文章初始的點(diǎn)擊數(shù),如果不修改會(huì)默認(rèn)隨機(jī)顯示文章點(diǎn)擊數(shù)

update `dede_archives` set click=598

注:更新所有文章的點(diǎn)擊數(shù)為598

update `dede_archives` set click=598 WHERE id=131

注:表示更新ID131的文檔點(diǎn)擊為598

update `dede_archives` set click=598 WHERE typeid=131

注:表示更新欄目ID為131的文檔點(diǎn)擊為598

織夢(mèng)sql命令批量替換文章作者:

update dede_archives set writer=replace(writer,'admin','小夢(mèng)博客');

織夢(mèng)sql命令批量替換文章來(lái)源:

update dede_archives set source=replace(source,'未知','小夢(mèng)博客');

織夢(mèng)sql命令批量替換文章標(biāo)題:

update dede_archives set title=replace(title,'改之前','改之后');

例如:我想把標(biāo)題中“小夢(mèng)博客”改“seo博客”:update dede_archives set title=replace(title,'小夢(mèng)博客','seo博客');

織夢(mèng)sql命令批量替換文章描述:

update dede_archives set description=replace(description,'原來(lái)的關(guān)鍵詞','替換后的關(guān)鍵詞');

織夢(mèng)sql命令批量替換文章模型的部分內(nèi)容:

update dede_addonarticle set body=replace(body,'原來(lái)的關(guān)鍵詞','替換后的關(guān)鍵詞');

注:文章模型也可以變更為圖片模型和軟件模型

織夢(mèng)sql命令修改標(biāo)題長(zhǎng)度限制:

修改dedecms系統(tǒng)》系統(tǒng)基本參數(shù)》其他選項(xiàng)》文檔標(biāo)題最大長(zhǎng)度為200,改此參數(shù)后需要手工修改數(shù)據(jù)表:

alter table dede_archives modify column title varchar(200)

織夢(mèng)sql命令批量替換文章模型中內(nèi)容部分超鏈接:

update dede_addonarticle set body=replace(body,'href="http://mengdiqiu.com.cn','href="http://xiuzhanwang.com');

例如:把文章模型中的超鏈接由原來(lái)的http://www.xiaomseo.com替換成http://xiaomseo.com

織夢(mèng)sql命令批量審核文章:

update dede_archives set arcrank=0

注:arcrank=0 僅動(dòng)態(tài)

織夢(mèng)sql命令更改縮略圖目錄:

update dede_archives set litpic=replace(litpic,'原來(lái)的字符','替換后的字符')

例如:update dede_archives set litpic=replace(litpic,'uplimg,'tupian')

織夢(mèng)批量修改文章動(dòng)態(tài)或靜態(tài)的sql語(yǔ)句

將所有文檔設(shè)置為“僅動(dòng)態(tài)”:update dede_archives set ismake=-1

將所有文檔設(shè)置為“僅靜態(tài)”:update dede_archives set ismake=1

將所有欄目設(shè)置為“使用動(dòng)態(tài)頁(yè)”: update dede_arctype set isdefault=-1

將所有欄目設(shè)置為“使用靜態(tài)頁(yè)”: update dede_arctype set isdefault=1

織夢(mèng)常用的刪除SQL命令:

如何去掉url中/a/目錄呢?

1、首先在系統(tǒng)設(shè)置》系統(tǒng)基本參數(shù),文檔html默認(rèn)保存路徑,把a(bǔ)去掉。

2、在dedecms后臺(tái)中sql命令中執(zhí)行下面sql命令,然后重新生成頁(yè)面。

代碼如下:

update dede_arctype set typedir=replace(typedir,'a/','')

織夢(mèng)sql命令批量刪除所有文章:

delete from dede_addonarticle where aid>0;

delete from dede_arctiny where id>0;

delete from dede_archives where id>0;

織夢(mèng)sql命令批量刪除某個(gè)id段的文章:

delete from dede_addonarticle where aid >= 100 and aid< =5000;

delete from dede_arctiny where id >= 100 and id< =5000;

delete from dede_archives where id >= 100 and id<=5000;

這段sql命令就是把文章id從100到5000的全部刪除掉

織夢(mèng)sql命令批量刪除某個(gè)欄目下文章:

delete from dede_addonimages where typeid = 7;

delete from dede_arctiny where typeid = 7;

delete from dede_archives where typeid = 7;

織夢(mèng)sql命令批量刪除指定欄目:

delete from dede_arctype where id in (93,94,95,96,97)

注:這段sql命令就是把欄目id為93、94、95、96、97的欄目刪除掉了

織夢(mèng)sql命令批量合并文章到指定欄目:

update dede_archives set typeid='70' where typeid in (93,94,95,96,97)

注:這段sql命令就是把欄目欄目id為93,94,95,96,97里面的文章歸為欄目id為70的欄目下面

織夢(mèng)sql命令批量合并欄目到指定欄目為子欄目:

Update `dede_arctype` set reid='目標(biāo)父欄目ID' where id in(2,3,4,5)

織夢(mèng)sql命令批量清空文章:

delete from dede_addonarticle;

delete from dede_addonimages;

delete from dede_archives;

delete from dede_arctiny;

delete from dede_co_htmls;

delete from dede_co_urls;

delete from dede_co_mediaurls;

delete from dede_tagindex ;

delete from dede_taglist;

delete from dede_keywords;

注:這段sql命令意思是清空文章和原來(lái)采集過(guò)的記錄

織夢(mèng)新發(fā)布文章id從1開(kāi)始:

alter table `dede_archives` auto_increment =1;

alter table `dede_arctiny` auto_increment =1;

alter table `dede_addonarticle` auto_increment =1;

織夢(mèng)新發(fā)布欄目id從1開(kāi)始:

alter table `dede_arctype` auto_increment =1;

注:表示新發(fā)布的文章或者欄目id從1開(kāi)始,數(shù)字1也可以改為指定從任意id開(kāi)始

上一篇:織夢(mèng)DeDecms無(wú)法自動(dòng)提取縮略圖的兩種解決方法適用于虛擬主機(jī)

欄    目:dedecms

下一篇:dede問(wèn)答偽靜態(tài)后出現(xiàn)404的解決方法

本文標(biāo)題:織夢(mèng)SQL命令行工具常用操作代碼

本文地址:http://mengdiqiu.com.cn/a1/dedecms/15232.html

更多dedecms

您可能感興趣的文章

閱讀排行

本欄相關(guān)

隨機(jī)閱讀

網(wǎng)頁(yè)制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語(yǔ)言數(shù)據(jù)庫(kù)服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有