99热这里只有精品一区-国产精品一级香蕉一区-在线激情av中文字幕-日韩在美女视频在线观看

帝國cms常用的SQL語句
  • 更新時間:2025-10-16 11:08:52
  • 開發經驗
  • 發布時間:2年前
  • 673

1.復制tags字段內容到keyboard,當keyboard為空的時候:

update [!db.pre!]ecms_news_data_1 a, [!db.pre!]ecms_news b set b.keyboard=a.infotags where a.id=b.id and b.keyboard='';


2.添加tags字段內容到keyboard:

update [!db.pre!]ecms_news_data_1 a, [!db.pre!]ecms_news b set b.keyboard=concat(b.keyboard,',',a.infotags) where a.id=b.id and b.keyboard<>'' and a.infotags<>'';


3.如果副表中keyid(相關鏈接)字段為空,說明keyboard設置不合理,干脆清空,為自動分詞掃清障礙

update [!db.pre!]ecms_news_data_1 a, [!db.pre!]ecms_news b set b.keyboard='' where a.id=b.id and a.keyid=''


4.newstext在副表,提取第一張圖片為標題圖片。當標題圖片為空的時候。

update [!db.pre!]ecms_news_data_1 a, [!db.pre!]ecms_news b set b.titlepic=concat(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(a.newstext, '.jpg', 1),'src=',-1),'"',''),'.jpg') where a.newstext like '%.jpg%' and b.titlepic='' and a.id=b.id;


update [!db.pre!]ecms_news_data_1 a, [!db.pre!]ecms_news b set b.titlepic=concat(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(a.newstext, '.gif', 1),'src=',-1),'"',''),'.gif') where a.newstext like '%.gif%' and b.titlepic='' and a.id=b.id;

我們專注高端建站,小程序開發、軟件系統定制開發、BUG修復、物聯網開發、各類API接口對接開發等。十余年開發經驗,每一個項目承諾做到滿意為止,多一次對比,一定讓您多一份收獲!

本文章出于推來客官網,轉載請表明原文地址:https://www.tlkjt.com/experience/8100.html
推薦文章

在線客服

掃碼聯系客服

3985758

回到頂部