howtothings.co.uk
How to fix SQL Error 1054 - Unknown column - Printable Version

+- howtothings.co.uk (https://www.howtothings.co.uk)
+-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4)
+--- Forum: Website Development, Implementation and General Webmaster Support (https://www.howtothings.co.uk/forumdisplay.php?fid=9)
+--- Thread: How to fix SQL Error 1054 - Unknown column (/showthread.php?tid=372)



How to fix SQL Error 1054 - Unknown column - Mark - 25-09-2010

I'd just upgraded to MyBB version 1.6, and everything was running smoothly until i started cleaning up my plugins, in the process i removed my old 1.4 prefix plugin as 1.6 has its own support.

Then i tried to browse categories and just received;

[Image: 6r62c6.jpg]


Code:
MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 't.prefix' in 'on clause'
Query
SELECT t.*, p.displaystyle AS threadprefix, ((t.totalratings/t.numratings) AS averagerating, r.uid AS rated, t.username, u.username FROM mybb_threads t LEFT JOIN mybb_users u ON (u.uid = t.uid) LEFT JOIN mybb_threadratings r ON(r.tid=t.tid AND r.uid='1') LEFT JOIN mybb_threadprefixes p ON (p.pid = t.prefix) WHERE t.fid='28' AND (t.visible='1' or t.visible='0') ORDER BY t.sticky DESC, t.lastpost desc, LIMIT 0, 20


Which is bad.

Looking through the database using phpmyadmin, i couldn't find the culprit.

Fix:

Re-upload the /install/ directory in to the root (public_html) of your website. Then browse to http://yourwebsite.com/install/upgrade.php and re-upgrade your forum. This'll reload the tables and clean up any crap.

Once finished, delete the /install/ directory and carry on as usual.



RE: How to fix SQL Error 1054 - Unknown column - Mark - 02-04-2011

Did you go through the re-install successfully from 1.4 to 1.6? It'll remove the old tables, (where this problem is)