Error creating ranks

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
mcoker
Registered User
Posts: 6
Joined: Wed Jan 30, 2002 1:13 am
Location: austinTX
Contact:

Error creating ranks

Post by mcoker »

I get this error when I create ranks...

Couldn't update/insert into ranks table

DEBUG MODE

SQL Error : 1054 Unknown column 'rank_max' in 'field list'

INSERT INTO phpbb_ranks (rank_title, rank_special, rank_max, rank_min, rank_image) VALUES ('Club President', 0, 0, 1, '')

Line : 182
File : /space/comm/universitysportbike.com/phpBB2/admin/admin_ranks.php


I recently upgraded from 1.4 to 2.0 RC-2. This happens when I try to create any type of rank. Anyone seen this before or know how to fix it?
mike
DC
Registered User
Posts: 48
Joined: Sat Jan 26, 2002 9:03 am
Location: MA
Contact:

Error creating ranks

Post by DC »

mcoker wrote: I get this error when I create ranks...

Couldn't update/insert into ranks table

DEBUG MODE

SQL Error : 1054 Unknown column 'rank_max' in 'field list'

INSERT INTO phpbb_ranks (rank_title, rank_special, rank_max, rank_min, rank_image) VALUES ('Club President', 0, 0, 1, '')

Line : 182
File : /space/comm/universitysportbike.com/phpBB2/admin/admin_ranks.php


I recently upgraded from 1.4 to 2.0 RC-2. This happens when I try to create any type of rank. Anyone seen this before or know how to fix it?


Use phpmyadmin if you have it and create the field "rank_max" in the table "ranks" following the outline the other fields have. Your DB is missing this field, which is why you receive this message. Same thing happened to me after upgrading.

Also, if you haven't, delete upgrade.php immediately from your site.

DC
mcoker
Registered User
Posts: 6
Joined: Wed Jan 30, 2002 1:13 am
Location: austinTX
Contact:

Error creating ranks

Post by mcoker »

DC wrote:
mcoker wrote: I get this error when I create ranks...

Couldn't update/insert into ranks table

DEBUG MODE

SQL Error : 1054 Unknown column 'rank_max' in 'field list'

INSERT INTO phpbb_ranks (rank_title, rank_special, rank_max, rank_min, rank_image) VALUES ('Club President', 0, 0, 1, '')

Line : 182
File : /space/comm/universitysportbike.com/phpBB2/admin/admin_ranks.php


I recently upgraded from 1.4 to 2.0 RC-2. This happens when I try to create any type of rank. Anyone seen this before or know how to fix it?


Use phpmyadmin if you have it and create the field "rank_max" in the table "ranks" following the outline the other fields have. Your DB is missing this field, which is why you receive this message. Same thing happened to me after upgrading.

Also, if you haven't, delete upgrade.php immediately from your site.

DC


I sent you a PM man. Thanks for the help!
mike
mcoker
Registered User
Posts: 6
Joined: Wed Jan 30, 2002 1:13 am
Location: austinTX
Contact:

Post by mcoker »

Can anyone tell me the commands to do this? I'm not very mysql savvy...
mike
User avatar
FrozenBlade
Registered User
Posts: 36
Joined: Tue Jan 29, 2002 10:56 pm
Contact:

Post by FrozenBlade »

I posted the command line I used in this post

Im sure if it is related, you will have to let me know. But afterwards i got a PHP function error which I posted about on this forum. No one answered me yet.
mcoker
Registered User
Posts: 6
Joined: Wed Jan 30, 2002 1:13 am
Location: austinTX
Contact:

Post by mcoker »

I still get the same error. I tried the command you put in your other post. Got any other suggestions? Here's the command I used...

mysql> ALTER TABLE ranks ADD rank_max MEDIUMINT NOT NULL;
Query OK, 0 rows affected (0.22 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql>
mike
Methost
Registered User
Posts: 12
Joined: Tue Sep 18, 2001 12:16 pm
Contact:

Post by Methost »

I already have the rank_max field in my DB .. yet I get this error too.

Im running phpBB 2.0 RC-2

any thoughts?
Methost
Registered User
Posts: 12
Joined: Tue Sep 18, 2001 12:16 pm
Contact:

Post by Methost »

bumpo?
Image
Blackman
Registered User
Posts: 137
Joined: Tue Feb 05, 2002 4:32 pm
Location: United Kingdom, Bristol
Contact:

Post by Blackman »

Im having the same problems as MetHost....so !bump!
mcoker
Registered User
Posts: 6
Joined: Wed Jan 30, 2002 1:13 am
Location: austinTX
Contact:

Post by mcoker »

I did this and it didnt work...

ALTER TABLE ranks ADD rank_max MEDIUMINT NOT NULL;

However, I did this, and it fixed it!

ALTER TABLE phpbb_ranks ADD phpbb_rank_max MEDIUMINT NOT NULL;

give it a shot
mike
Methost
Registered User
Posts: 12
Joined: Tue Sep 18, 2001 12:16 pm
Contact:

Post by Methost »

I see what happened ... I thought phpBB2 was using my new database (wich had a ranks_max) but it was using the old db that didnt have it.

ALTER TABLE phpbb_ranks ADD rank_max MEDIUMINT NOT NULL;

Worked for me .. thanks
Image
Blackman
Registered User
Posts: 137
Joined: Tue Feb 05, 2002 4:32 pm
Location: United Kingdom, Bristol
Contact:

Post by Blackman »

ALTER TABLE phpbb_ranks ADD phpbb_rank_max MEDIUMINT NOT NULL;


How do I do this...? sorry im not very good with php :(

I have a nicewebs account if thats any use
mcoker
Registered User
Posts: 6
Joined: Wed Jan 30, 2002 1:13 am
Location: austinTX
Contact:

Post by mcoker »

Blackman wrote:
ALTER TABLE phpbb_ranks ADD phpbb_rank_max MEDIUMINT NOT NULL;


How do I do this...? sorry im not very good with php :(

I have a nicewebs account if thats any use


You need to get to a mysql prompt on the server where your database is, login as the owner of your database then type "use database" where "database" is the name of your phpbb database. Then type those commands above. althought you may fuck some shit up, so you might want to have someone who knows what they're doing do this. :)
mike
Blackman
Registered User
Posts: 137
Joined: Tue Feb 05, 2002 4:32 pm
Location: United Kingdom, Bristol
Contact:

Post by Blackman »

You the man thanks mcoker!!!! :D
User avatar
FrozenBlade
Registered User
Posts: 36
Joined: Tue Jan 29, 2002 10:56 pm
Contact:

Post by FrozenBlade »

here is the code I used, you must be @ a mysql prompt, or area that accepts the mysql commands, first make sure to connect to your database, default name phpBB
Code:
ALTER TABLE ranks ADD rank_max MEDIUMINT NOT NULL;


Keep in mind ranks and rank_max may need to be changed to match your database structure.

Once i did this i had no issues with the rank system. Hope that helps someone.

Here is the Mysql docs reference: http://www.mysql.com/doc/A/L/ALTER_TABLE.html


Did you guys not read the note after the code i gave you. If you remeber when you ran install.php, there was a field labeled database prefix, if it had phpbb_ in it, they you needed to make ranks phpbb_ranks, etc.

If you were not sure, then you needed to open your phpbb database and view the table layouts and naming.....

I gave you the correct answer....you just didn't read.

If you check your ranks table and it has a rank_max field then check to make sure it is MEDIUMINT NOT NULL. in the table design from a mysql promp when you view it with will have MEDIUMINT in one description field and for the value( think it's called value), it should have a 0 (zero), not the words NULL.

If it has all that, make sure the name is right. If it is called rank_max in your database, and phpbb is looking for phpbb_rank_max, you will need to rename the field.

:?
Locked

Return to “2.0.x Support Forum”