PDA

View Full Version : Database help needed...


philosophie
09-16-2003, 02:41 AM
Umm I'm not sure whether I'm in the right place, but forward me on if I am...

I'm trying to run a mysql file to make some databases (for a mod I'm using on phpbb). However, stupid me deleted one of the tables and I'm not quite sure how to get it back. The table I deleted won't affect my board yet, but it was a part of the mod and I really would like to know how to get it back...

I'm relatively new to this but I'm willing to learn, even if it's by the hard way I'm going through now =)

Thanks for any help!

infringer
09-16-2003, 07:09 AM
Maybe the mod came with some .sql files?? If so you should just be able to run those files either through PHPmyadmin or command line and "reinstall" so to speak the tables.

hth,
David

philosophie
09-16-2003, 10:37 PM
Hey =) Thanks for your help! I wasn't very clear in my last post, but now I've got some more information to attempt to get some help for.

I did run the .sql file as it was asked to, but for some really stupid reason, I deleted (or in the database way, "dropped" the table) and now I can't get the certain table back. It is for the "Country Flags" mod if anyone wants to know. So I've lost the "phpbb_flags" table which I've now found out is very much needed in the mod.

And now when trying to run the sql file now, I recieve this error:

SQL-query :

ALTER TABLE phpbb_users ADD user_from_flag varchar( 25 ) NULL AFTER user_from

MySQL said:


Duplicate column name 'user_from_flag'


Is there any way of restarting the tables and columns that were added, so I can re-run the sql files successfully?

Ask any questions if I haven't been clear enough =)

Thankyou!

Sardtok
09-17-2003, 07:28 AM
You could try to read the sql files and extract the query that generates the table you deleted,
and then just copy paste that as sql into phpmyadmin's sql field...

Should be a lot simpler than finding out which tables/fields to delete and rerun the whole thing...

philosophie
09-18-2003, 12:21 AM
THANKYOUUUUUUUUUUUUUUUUUUUUUUUUUU! It works! YAY I learnt something. I had never opened a .sql file until then...I just let them do their own thing - but now I'm slowly beginning to understand how it all fits in =)

I appreciate your help because now my forum is all up and running...once people join =P

Thank-you again =)
Sarah.