MyBB Community Forums

Full Version: Mod CP SQL Errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'Array' in 'where clause'
Query:
SELECT COUNT(aid) AS unapprovedattachments FROM mybb_attachments a LEFT JOIN mybb_posts p ON (p.pid=a.pid) LEFT JOIN mybb_threads t ON (t.tid=p.tid) WHERE a.visible='0' AND t.fid NOT IN (Array)

One of my staff gets that when trying to access modcp.php. He has a super moderator account. I have an admin account and I don't have the same issue. I then made his account an admin account and he still had it. He tried two browsers with no success.

I've repaired the tables in pma.

Any ideas?

Cheers.
Are any other users experiencing the problem apart from him
So I'm guessing nobody knows.
If I'm not wrong, this has already been reported as an issue to be fixed., let me see if I can find the thread/post.
(2012-09-04, 07:22 AM)Omar G. Wrote: [ -> ]If I'm not wrong, this has already been reported as an issue to be fixed., let me see if I can find the thread/post.

OK. I did search for the error but didn't find anything of any use.
They weren't helpful.
Did you, somehow, used the merge system?
(2012-09-06, 02:46 PM)Omar G. Wrote: [ -> ]Did you, somehow, used the merge system?

no.
Open modscp.php, find:
if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
	$flist .= " AND fid NOT IN ({$unviewableforums})";
	$tflist .= " AND t.fid NOT IN ({$unviewableforums})";

	$unviewableforums = str_replace("'", '', $unviewableforums);
	$unviewableforums = explode(',', $unviewableforums);
}

Repace:
if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
	if(is_array($unviewableforums))
	{
		$unviewableforums = str_replace("'", '', implode(',', $unviewableforums));
	}

	$flist .= " AND fid NOT IN ({$unviewableforums})";
	$tflist .= " AND t.fid NOT IN ({$unviewableforums})";

	$unviewableforums = str_replace("'", '', $unviewableforums);
	$unviewableforums = explode(',', $unviewableforums);
}
Pages: 1 2