MyBB Community Forums

Full Version: SQL Error:1054 - Unknown column 'r.username
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We are getting the following error message. Could any advise the problem and cure please.

Using version 1.8.19

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:1054 - Unknown column 'r.username' in 'order clause'QueryConfusedELECT r.*, u.username, u.usergroup, u.displaygroup FROM mybb_threadsread r LEFT JOIN mybb_users u ON (u.uid = r.uid) WHERE r.tid = '2028' AND u.uid != '0' ORDER BY r.username ASC LIMIT 100
What were you doing when you received this error?

What plugins do you have installed?

I would imagine that mybb_users has the username column, not mybb_threadsread, so the order by clause should probably reference u.username instead of r.username. Your where clause should probably reference r.uid != 0 instead of u.ui.
I found a possible answer in one of the responses in this thread.

also search Google for "SQL Error:1054 - Unknown column 'r.username' in mybb"

your answer is one of the suggestions, you just have to find it.
Many thanks for your help and guidance.
It turned out to be a plugin in the end.