MyBB Community Forums
Mod CP SQL Errors - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: Mod CP SQL Errors (/thread-125572.html)

Pages: 1 2


Mod CP SQL Errors - Diminished - 2012-09-03

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.


RE: Mod CP SQL Errors - TMGFX - 2012-09-03

Are any other users experiencing the problem apart from him


RE: Mod CP SQL Errors - Diminished - 2012-09-04

So I'm guessing nobody knows.


RE: Mod CP SQL Errors - Omar G. - 2012-09-04

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.


RE: Mod CP SQL Errors - Diminished - 2012-09-04

(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.


RE: Mod CP SQL Errors - Omar G. - 2012-09-06

Please refer to the following threads to see if any of them are of use to you:
http://community.mybb.com/thread-68110.html
http://community.mybb.com/thread-89959.html
http://community.mybb.com/thread-124385.html


RE: Mod CP SQL Errors - Diminished - 2012-09-06

They weren't helpful.


RE: Mod CP SQL Errors - Omar G. - 2012-09-06

Did you, somehow, used the merge system?


RE: Mod CP SQL Errors - Diminished - 2012-09-06

(2012-09-06, 02:46 PM)Omar G. Wrote: Did you, somehow, used the merge system?

no.


RE: Mod CP SQL Errors - Omar G. - 2012-09-06

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);
}