帝国cms常用的SQL语句

小七 33 0

  1.复制tags字duànróngdàokeyboard,当keyboardwèikōngdehòu

  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字duànróngdàokeyboard:

  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.guǒ副表zhōngkeyid(xiāng关链接)字duànwèikōng,说明keyboard设置合理 ,gànqīngkōng,wèi自动分词扫qīng障碍

  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在副表,提第一张图片wèi标题图片。当标题图片wèikōngdehòu。

  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=''"',''),'.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=''"',''),'.gif') where a.newstext like '%.gif%' and b.titlepic='' and a.id=b.id;

标签: 随州seo公司立找10火星 seo网站的蚁云速捷13 ur建站肖登天SEO优化网站怎么样 零零七seo团队 seo小说站

发表评论 (已有0条评论)

还木有评论哦,快来抢沙发吧~