Accidentally deleted my phpbb_user_group table!!

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
s4075051
Registered User
Posts: 11
Joined: Thu May 29, 2008 2:18 pm

Accidentally deleted my phpbb_user_group table!!

Post by s4075051 » Fri Jul 11, 2008 9:50 pm

Ok, so I accidentally typed DROP TABLE phpbb_user_group instead of phpbb_user_group_TEST and now I've deleted my user_group table and feel kind of silly. Anyway, I've looked up the mysql section in the install.php script and restored the structure of the table.

I'm not so worried about the normal users since I can just re-add their groups through mods and stuff but I just need to reset the guest and administrator 'group' settings manually. I don't know how to manually add these values and I couldn't find an online resource for it, so if someone could please do a screen-dump of the result for this query from any phpbb2 (mysql) install :

[/code]
SELECT * FROM phpbb_user_group WHERE user_id < 3
[/code]

that would be much appreciated. Cheers

P.S. For reference to anyone else, the result of that query will give the user_group settings for the guest and admin 'users' (which I have user_id values of -1 and 2 in a standard install I think?)

P.P.S Also, what is the primary key? For some reason this didn't get set when I recreated the table. It's user_id right?
Last edited by ric323 on Sat Jul 12, 2008 12:39 am, edited 1 time in total.
Reason: Topic icon changed

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Accidentally deleted my phpbb_user_group table!!

Post by ric323 » Sat Jul 12, 2008 12:25 am

SQL query: SELECT * FROM phpbb_user_group WHERE user_id < 3 LIMIT 0, 30 ;
Rows: 2

group_id user_id user_pending
1 -1 0
2 2 0
group_id and user_id are both index fields.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

s4075051
Registered User
Posts: 11
Joined: Thu May 29, 2008 2:18 pm

Re: Accidentally deleted my phpbb_user_group table!!

Post by s4075051 » Sat Jul 12, 2008 12:35 am

great thanks for that :)

s4075051
Registered User
Posts: 11
Joined: Thu May 29, 2008 2:18 pm

Re: Accidentally deleted my phpbb_user_group table!!

Post by s4075051 » Sat Jul 12, 2008 1:06 am

As a point of interest though, registration, posting, administrative tasks and guest status worked fine without the user/admin group existing in phpbb_user_group. Neat.

Locked

Return to “2.0.x Support Forum”