zoukankan      html  css  js  c++  java
  • Discuz! X1.5 访问群组group.php页面提示数据库错误的解决方法

    访问群组group.php页面提示数据库错误的解决方法:(同时还包括DIY群组幻灯片失效,DIY显示群组名和主题失效)
    Discuz! Database Error
    The database has encountered a problem. Need Help?
    Error messages:
    [Type] 查询语句错误
    [1054] Unknown column 't.fid' in 'on clause'
    [Query] SELECT attach.*,t.tid,t.author,t.authorid,t.subject , f.name groupname FROM `forum_attachment` attach LEFT JOIN forum_forum f ON t.fid=f.fid LEFT JOIN forum_forumfield ff ON f.fid = ff.fid INNER JOIN `forum_thread` t ON `t`.`tid`=`attach`.`tid` AND `displayorder`>='0' WHERE `attach`.`dateline`>='1287454216' AND `attach`.`readperm`='0' AND `attach`.`price`='0' AND t.isgroup='1'AND `attach`.`isimage` IN ('1', '-1') ORDER BY `attach`.`dateline` DESC LIMIT 0,4;

    Program messages:
    [Line: 0034]group.php(require)
    [Line: 0140]source/module/group/group_index.php(include)
    [Line: 0440]data/template/1_diy_group_index.tpl.php(output)
    [Line: 1022]source/function/function_core.php(block_updatecache)
    [Line: 0204]source/function/function_block.php(block_groupattachment->getdata)
    [Line: 0298]source/class/block/group/block_groupattachment.php(DB->query)
    [Line: 0837]source/class/class_core.php(DB->_execute)


    已经将此出错信息详细记录, 由此给您带来的访问不便我们深感歉意



    打开 source/class/block/group/block_groupattachment.php 文件
    找到

    $query = DB::query("SELECT attach.*,t.tid,t.author,t.authorid,t.subject $sqlfield
    FROM `".DB::table('forum_attachment')."` attach
    $sqljoin
    INNER JOIN `".DB::table('forum_thread')."` t
    ON `t`.`tid`=`attach`.`tid` AND `displayorder`>='0'
    WHERE $htsql AND `attach`.`readperm`='0' AND `attach`.`price`='0'
    $sql
    $sqlban
    $sqlgroupby
    $orderbysql
    LIMIT $startrow,$items;"
    );

    改为

     

       $query = DB::query("SELECT attach.*,t.tid,t.author,t.authorid,t.subject $sqlfield
        FROM `".DB::table('forum_attachment')."` attach
        INNER JOIN `".DB::table('forum_thread')."` t
        ON `t`.`tid`=`attach`.`tid` AND `displayorder`>='0'   
        $sqljoin
        WHERE $htsql AND `attach`.`readperm`='0' AND `attach`.`price`='0'
        $sql
        $sqlban
        $sqlgroupby
        $orderbysql
        LIMIT $startrow,$items;"
       );  
    即可。

  • 相关阅读:
    VMWare 桥接模式
    什么是交叉编译,为什么要使用交叉编译
    最常用的四种大数据分析方法
    C#的Dispose模式复习
    Oracle Data Provider for .NET Support for Microsoft .NET Core
    微软发布了量子计算开发包
    关于Oracle分区表的理解
    html 中video标签视频不自动播放的问题
    input 修改placeholder颜色
    正则表达式 手机号验证、邮箱验证、6~16位数字加字母组合、身份证号码验证
  • 原文地址:https://www.cnblogs.com/ybbqg/p/2405491.html
Copyright © 2011-2022 走看看