المشاركة الأصلية كتبت بواسطة eng_medo
انتظر ردودكم
Data**** error in vBulletin 3.6.5:
Invalid SQL:
SELECT
IF(votenum >= 1, votenum, 0) AS votenum,
IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
post.pagetext AS preview,
thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open, replycount, postusername, postuserid, thread.iconid AS threadiconid,
thread.lastpost, thread.lastposter, thread.lastpostid, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, votetotal, thread.attach,
hiddencount, deletedcount
, NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
, threadredirect.expires
, thread.stampid, stamps.title, stamps.icon AS stampicon, stamps.color, attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid , attachment.filesize AS filesize ,attachment.filename AS filename, MIN(attachment.attachmentid) AS attachmentid
FROM thread AS thread
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
LEFT JOIN threadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)
LEFT JOIN stamps AS stamps ON(thread.stampid = stamps.stampid)LEFT JOIN attachment as attachment ON(attachment.postid = thread.firstpostid) LEFT JOIN attachment as attachment ON(attachment.postid = thread.firstpostid)
WHERE thread.threadid IN (0) GROUP BY thread.threadid GROUP BY thread.threadid
ORDER BY sticky DESC, lastpost DESC;
MySQL Error : Not unique table/alias: 'attachment'
Error Number : 1066
Date : Sunday, April 15th 2007 @ 07:08:04 AM
Script :
http://www.cgway.net/forumdisplay.php?f=45
Referrer :
IP Address :************
Username : 000000000
Classname : vb_data****