查看: 243|回复: 0

dz!x3.4分享本地附件转远程附件和远程附件转本地附件的SQL...

[复制链接]

67

主题

66

帖子

2014

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2014
发表于 2023-1-10 21:36:41 | 显示全部楼层 |阅读模式
技巧提示
  • 您可以通过修改 /source/admincp/admincp_quickquery.php 来添加常用 SQL 操作进行功能扩充。
  • 出于安全考虑,Discuz! 后台默认情况下禁止 SQL 语句直接执行,只能使用常用 SQL 当中的内容,
    如果您想自己随意书写 SQL 升级语句,需要将 config/config_global.php 当中的 $_config[admincp][runquery] 设置修改为 1。
  • 定位:96行
本地转远程
  1. update pre_forum_attachment_0 set remote = '1' ;
  2. update pre_forum_attachment_1 set remote = '1' ;
  3. update pre_forum_attachment_2 set remote = '1' ;
  4. update pre_forum_attachment_3 set remote = '1' ;
  5. update pre_forum_attachment_4 set remote = '1' ;
  6. update pre_forum_attachment_5 set remote = '1' ;
  7. update pre_forum_attachment_6 set remote = '1' ;
  8. update pre_forum_attachment_7 set remote = '1' ;
  9. update pre_forum_attachment_8 set remote = '1' ;
  10. update pre_forum_attachment_9 set remote = '1' ;
复制代码
远程转本地
  1. update pre_forum_attachment_0 set remote = '0' ;
  2. update pre_forum_attachment_1 set remote = '0' ;
  3. update pre_forum_attachment_2 set remote = '0' ;
  4. update pre_forum_attachment_3 set remote = '0' ;
  5. update pre_forum_attachment_4 set remote = '0' ;
  6. update pre_forum_attachment_5 set remote = '0' ;
  7. update pre_forum_attachment_6 set remote = '0' ;
  8. update pre_forum_attachment_7 set remote = '0' ;
  9. update pre_forum_attachment_8 set remote = '0' ;
  10. update pre_forum_attachment_9 set remote = '0' ;
复制代码

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|创恒科技

© 湘公网安备 43313002000023号

GMT+8, 2024-11-22 00:04 , Processed in 0.159733 second(s), 28 queries .

Powered by VHN.CN

© 2003-2023

快速回复 返回顶部 返回列表