1 (edited by pl0x 2004-11-05 19:18)

Topic: I have deleted users table

I have deleted 'users' table in DB. sad
How Can I fix the forum. Is it possible?
I need any advice !

And what parametres must have admin in db ?

Re: I have deleted users table

That will be very difficult to fix.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: I have deleted users table

if you have 2 users, perhaps not that hard, but if you have 200, you most likely need a backup to use(soo much manual work to figure out everything), and by your question I guess you haven't made a backup ...

(that reminds me, time to do a backup on all my webstuff)

4 (edited by zaher 2004-11-05 23:31)

Re: I have deleted users table

extract them from posts table bby execute SQL

insert into punbb_en_users (id, username, password) 
(select  poster_id ,poster, md5('hedden password') from punbb_en_posts
where poster_id>0
group by poster_id, poster)

but all of users have new password 'hidden password' change it to any string before execute SQL and do not give it to any one.
thay cannot login and request new password so ask them to send you a new email and you will send them a new password and correct email addresses.

Backup your database, and dont play with fire big_smile

EDIT
change tables name in code to correct names

punbb_en_users 
punbb_en_posts

If your people come crazy, you will not need to your mind any more.

Re: I have deleted users table

if a user have made 1000 posts, will it really be 1 row added in the users table then?

Re: I have deleted users table

i assume thats what group by poster_id, poster does

Re: I have deleted users table

aah smile

8 (edited by zaher 2004-11-06 21:43)

Re: I have deleted users table

i like "group by" instead "distent"

insert into punbb_en_users (id, username, password) 
(select distinct poster_id ,poster, md5('hedden password') from punbb_en_posts
where poster_id>0)
If your people come crazy, you will not need to your mind any more.

9

Re: I have deleted users table

Done
The main difficulty was to put all that users in the same order ... cause in other case there is a post mixture. Got the information from the posts table.
Have wasted a lot of time smile

Re: I have deleted users table

smile

now, do a backup, just in case you do decide to delete something again big_smile

11

Re: I have deleted users table

I have memory about crashing my harddisk, you must see my face it is like Frankishtine smile

If your people come crazy, you will not need to your mind any more.