Errormessages: [Type] query statement error [1054] Unknowncolumnt. fidinonclause [Query] SELECTattach. *, t. tid, t. author, t. authorid, t. subject, f. namegroupnameFROM 'forum _ attachment 'attac
Error messages:
[Type] query statement error
[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 '> = '20140901' 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: 0429] data/template/nvidiy_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)
Localhost has recorded the error details, and we apologize for any inconvenience caused.
The error is because t. fid is called in advance when the association in forum_thread (table t) is not introduced, resulting in an SQL error,
I checked it online and couldn't solve the problem. I went to the official forum to check the problem. someone raised the problem, but there was no solution. I had to read the source code of Kangsheng by myself.
The final locking problem lies in source/class/block/group/block_groupattachment.php.
Original
FROM '". DB: table ('forum _ attachment')." 'Attach $ "wp_keywordlink_affiliate"> sqljoin
Inner join '". DB: table ('forum _ thread')."' t
ON 'T'. 'tid' = 'Attach '. 'tid' AND 'displayorder'> = '0'
Correct after modification
FROM '". DB: table ('forum _ attachment')." 'Attach
Inner join '". DB: table ('forum _ thread')."' t
ON 'T'. 'tid' = 'Attach '. 'tid' AND 'displayorder'> = '0'
$ "Wp_keywordlink_affiliate"> sqljoin
I am afraid this is a BUG. I personally think the Discuz X code is messy.