Current time: 05-24-2012, 11:57 AM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] Deleting queued attachments [C-Michael83]
09-27-2008, 08:54 AM (This post was last modified: 10-28-2008 01:45 PM by Michael S..)
Post: #1
[F] Deleting queued attachments [C-Michael83]
I get this error when trying to delete queued attachments in
modcp.php?action=modqueue

Code:
MyBB
MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
    1054 - Unknown column 'p.tid' in 'on clause'
Query:
    SELECT a.pid, a.aid FROM mybb_attachments a LEFT JOIN mybb_threads t ON (t.tid=p.tid) WHERE aid IN (47,48,51,52,53,54,59,60)

Please contact the MyBB Group for support.
Find all posts by this user
09-27-2008, 01:21 PM
Post: #2
[F] Deleting queued attachments
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
Visit this user's website Find all posts by this user
09-27-2008, 01:21 PM (This post was last modified: 09-27-2008 01:21 PM by Yumi.)
Post: #3
RE: [F] Deleting queued attachments
To fix, in modcp.php, find:
PHP Code:
$query $db->query("
            SELECT a.pid, a.aid
            FROM  "
.TABLE_PREFIX."attachments a
            LEFT JOIN "
.TABLE_PREFIX."threads t ON (t.tid=p.tid)
            WHERE aid IN ("
.implode(","array_map("intval"array_keys($mybb->input['attachments'])))."){$flist}
        "
); 

Replace with:
PHP Code:
$query $db->query("
            SELECT a.pid, a.aid
            FROM  "
.TABLE_PREFIX."attachments a
            LEFT JOIN "
.TABLE_PREFIX."posts p ON (a.pid=p.pid)
            LEFT JOIN "
.TABLE_PREFIX."threads t ON (t.tid=p.tid)
            WHERE aid IN ("
.implode(","array_map("intval"array_keys($mybb->input['attachments'])))."){$tflist}
        "
); 
Visit this user's website Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication