السلام عليكم اخوانى
عندى مشكلة فى فتح الاقسام منتداى حين افتحها
يضهر لى Database error و يعطينى هذا
ارجوا حل
عندى مشكلة فى فتح الاقسام منتداى حين افتحها
يضهر لى Database error و يعطينى هذا
PHP:
Database error in vBulletin 3.7.3:
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, postusername, postuserid, thread.iconid AS threadiconid,
thread.dateline, notes, thread.visible, sticky, votetotal, thread.attach, thread.lastpost, thread.lastposter, thread.lastpostid, replycount, IF(views<=replycount, replycount+1, views) AS views,
thread.prefixid, thread.taglist, 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
, attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid , attachment.thumbnail_filesize AS thumbsize , 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 attachment as attachment ON(attachment.postid = thread.firstpostid AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png')) LEFT JOIN attachment as attachment ON(attachment.postid = thread.firstpostid AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png'))
WHERE thread.threadid IN (0,180,181,148,86) GROUP BY thread.threadid GROUP BY thread.threadid
ORDER BY sticky DESC, lastpost DESC;
MySQL Error : Not unique table/alias: 'attachment'
Error Number : 1066
Request Date : Wednesday, May 27th 2009 @ 05:25:15 PM
Error Date : Wednesday, May 27th 2009 @ 05:25:15 PM
Script : ....
Referrer : ...
IP Address : ...
Username : ...
Classname : vB_Database
MySQL Version : 5.0.81-1
ارجوا حل