Quote:
Originally Posted by sebbo
Hi,
I keep getting this error:
Database error in vBulletin 3.6.1:
Invalid SQL:
SELECT
deletionlog.*,
deletionlog.primaryid AS postid,
deletionlog.type AS deltype,
deletionlog.userid AS userid,
thread.*,
thread.title AS threadtitle,
thread.forumid AS forumid,
forum.*,
forum.title AS forumtitle,
user.username
FROM deletionlog AS deletionlog
LEFT JOIN user AS user USING(userid)
LEFT JOIN thread AS thread ON thread.threadid = deletionlog.primaryid
LEFT JOIN forum AS forum ON forum.forumid = thread.forumid
WHERE deletionlog.type = 'thread'
ORDER BY `dateline` DESC
LIMIT 0, 15;
MySQL Error : Column 'dateline' in order clause is ambiguous
Error Number : 1052
Is this because I use 3.6.1?
|
Error:
SELECT
deletionlog.*,
deletionlog.primaryid AS postid,
deletionlog.type AS deltype,
deletionlog.userid AS userid,
thread.*,
thread.title AS threadtitle,
thread.forumid AS forumid,
forum.*,
forum.title AS forumtitle,
user.username
FROM deletionlog AS deletionlog
LEFT JOIN user AS user USING(userid)
LEFT JOIN thread AS thread ON thread.threadid = deletionlog.primaryid
LEFT JOIN forum AS forum ON forum.forumid = thread.forumid
WHERE deletionlog.type = 'thread'
ORDER BY `dateline` DESC
LIMIT 0, 15;
===============
Fix
SELECT
deletionlog.*,
deletionlog.primaryid AS postid,
deletionlog.type AS deltype,
deletionlog.userid AS userid,
post.dateline AS postdateline,
thread.*,
thread.title AS threadtitle,
thread.forumid AS forumid,
forum.*,
forum.title AS forumtitle,
user.username
FROM deletionlog AS deletionlog
LEFT JOIN user AS user USING(userid)
LEFT JOIN post AS post ON post.postid=deletionlog.primaryid
LEFT JOIN thread AS thread ON thread.threadid = deletionlog.primaryid
LEFT JOIN forum AS forum ON forum.forumid = thread.forumid
WHERE deletionlog.type = 'thread'
ORDER BY `dateline` DESC
LIMIT 0, 15;
Im test VBB 3.6.2
Open file softdeladmin.php
Find line:
ORDER BY `dateline` $sqlorder
Replate with:
ORDER BY `primaryid` $sqlorder
Or dele line:
ORDER BY `dateline` $sqlorder
Or dowload attach file.
Done!