MyBB Community Forums

Full Version: SQL Error 1194
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
SQL Error:
1194 - Table 'mybb_posts' is marked as crashed and should be repaired

Query:
SELECT p.pid, p.dateline, t.tid, t.subject, t.fid, t.prefix, t.replies, u.uid, u.username, u.usergroup, u.displaygroup, u.avatar FROM mybb_threads t INNER JOIN mybb_posts p ON p.tid = t.tid LEFT JOIN mybb_posts p2 ON p2.tid = t.tid AND p2.pid > p.pid LEFT JOIN mybb_users u ON t.lastposteruid = u.uid WHERE p.pid > 0 AND p.replyto != 0 AND t.visible = 1 AND p.visible = 1 AND p.fid NOT IN (59,65,66) AND p2.pid IS NULL ORDER BY p.pid DESC LIMIT 11

Help!
Run this in phpMyAdmin:

REPAIR TABLE `mybb_posts`;
Thanks! It worked! Phew!

Had a bit of an issue with losing connection to MySQL server during query, so I had to put in the query several times before it succeeded in executing the query and repairing the table.