Page 1 of 1

Error creating ranks

Posted: Wed Jan 30, 2002 1:15 am
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?

Error creating ranks

Posted: Wed Jan 30, 2002 5:00 am
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

Error creating ranks

Posted: Wed Jan 30, 2002 6:46 pm
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!

Posted: Sat Feb 02, 2002 2:54 am
by mcoker
Can anyone tell me the commands to do this? I'm not very mysql savvy...

Posted: Sat Feb 02, 2002 3:25 am
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.

Posted: Sat Feb 02, 2002 3:34 am
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>

Posted: Tue Feb 05, 2002 10:25 am
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?

Posted: Tue Feb 05, 2002 4:25 pm
by Methost
bumpo?

Posted: Tue Feb 05, 2002 4:49 pm
by Blackman
Im having the same problems as MetHost....so !bump!

Posted: Tue Feb 05, 2002 9:00 pm
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

Posted: Tue Feb 05, 2002 9:24 pm
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

Posted: Tue Feb 05, 2002 9:46 pm
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

Posted: Tue Feb 05, 2002 9:49 pm
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. :)

Posted: Tue Feb 05, 2002 9:50 pm
by Blackman
You the man thanks mcoker!!!! :D

Posted: Tue Feb 05, 2002 11:37 pm
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.

:?