MyBB Community Forums

Full Version: SQL Error 1054 - Unknown column 'postnum' in 'field list'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'postnum' in 'field list'
Query:
SELECT name, postnum, type, fid, required, maxlength FROM PBMnet_profilefields WHERE editable=1 ORDER BY disporder

-------------------------------------------------------------

My forum is located at: http://playbymail.net/mybb/index.php

A person reported a problem trying to register. I tried to register a new account, myself, and it gave me the same error.

I have tried deactivating all plug-ins, but the problem remains intact.

I used Softaculous to do the initial install and multiple upgrades, thereafter.

Plug-ins listed on my Plug-in page in the admin control panel are:

Akismet (1.2.2)
Bad Behavior (1.0.0)
Hello World! (1.0)
Show the users that has been online today (2.0)
Registration Security Question (1.2)
Stop Forum Spam (1.4)
Extra Safety Check While Registering (2.0)


I even deactivated all plug-ins, before I upgraded MyBB to the current version, but the problem remains intact.

Not sure how long that the problem has existed. Just looking to get it fixed.

Thanks for any help.

- Charles -
Don't use Softaculous because they don't always have the most up to date version. We also can't control errors their code may have.

Run this query in PHPMyAdmin:
ALTER TABLE mybb_users ADD postnum INT NOT NULL DEFAULT 0

After running this, you will want to use the Update Post Counts tool in the Admin CP under Tools & Maintenance.
Thanks. I tried that, and now when I try to register a new account, I get the following error:


MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'postnum' in 'field list'
Query:
SELECT name, postnum, type, fid, required, maxlength FROM PBMnet_profilefields WHERE editable=1 ORDER BY disporder
SQL query needs to be =>
ALTER TABLE PBMnet_profilefields ADD postnum INT NOT NULL DEFAULT 0 

if required, see also SQL queries guidance
You should be using an outdated database with newer files.
(2014-08-11, 05:43 AM).m. Wrote: [ -> ]SQL query needs to be =>

ALTER TABLE PBMnet_profilefields ADD postnum INT NOT NULL DEFAULT 0 

if required, see also SQL queries guidance

Superb assistance! I greatly appreciate it. That seems to have solved the problem. Just took me a bit to get around to trying it.

Thanks to all who helped!
Hi All,

I am now getting this same error.  I have just upgraded from 1.6.13 to 1.6.14 and run the upgrade script.  Then I applied the changed files packages for 1.6.15 and 1.6.16.  I went thru and tested some things and found that registrations no longer work.


Quote:SQL Error:

1054 - Unknown column 'postnum' in 'field list'

Query:
SELECT name, postnum, type, fid, required, maxlength FROM mybb_profilefields WHERE editable=1 ORDER BY disporder


I have tried executing the below query (from phpMyAdmin), but received an error #1060 - Duplicate column name 'postnum'

ALTER TABLE mybb_profilefields ADD postnum INT NOT NULL DEFAULT 0

Any ideas on this one?  I am doing these lesser upgrades first, to make sure that everything still works, etc., before making the jump to 1.8.x.  I don't want to proceed any further (to 1.8.x) until this one is worked out.

Thank you!

EDIT: Looks like I also get this error when attempting to edit profile of an existing user.
If anyone could please provide me with some input/recommendations on this problem I'd greatly appreciate it.  It doesn't seem wise to upgrade further until this issue has been worked out.  Thanks very much!