You are not logged in.

#1 2005-09-10 22:17:33

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,436
Website

Reversing these MySQL statements

INSERT INTO phpbb_config VALUES ('ignore_or_hide_forums', 1);
ALTER TABLE phpbb_users ADD user_ignore_hide_forums VARCHAR(255);
ALTER TABLE `phpbb_forums` ADD `forum_count_posts` TINYINT( 1 ) DEFAULT '1' NOT NULL AFTER `forum_last_post_id`;
ALTER TABLE phpbb_users ADD user_can_post TINYINT(1) default '1'

Basically, could someone supply the safest commands to "undo" these changes, please?  Thanks.[/code]

Offline

#2 2005-09-11 01:09:49

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Reversing these MySQL statements

dibblethewrecker wrote:
INSERT INTO phpbb_config VALUES ('ignore_or_hide_forums', 1);
ALTER TABLE phpbb_users ADD user_ignore_hide_forums VARCHAR(255);
ALTER TABLE `phpbb_forums` ADD `forum_count_posts` TINYINT( 1 ) DEFAULT '1' NOT NULL AFTER `forum_last_post_id`;
ALTER TABLE phpbb_users ADD user_can_post TINYINT(1) default '1'

Basically, could someone supply the safest commands to "undo" these changes, please?  Thanks.[/code]

For the first one, you would have to know what the column name is of the column containing the 'ignore_or_hide_forums' string value.
Then you can delete that entry based on that match...
[code]
delete from phpbb_config where column_name = 'ignore_or_hid_forums';
[/code]
something like that...
this should cover the rest..
but if you are real worried about it..either just leave them in there (if you arent using it..it doesnt matter) or do a dump and test locally to make sure they do what you want...
[code]
alter table phpbb_users drop user_ignore_hide_forums;
alter table phpbb_forums drop forum_count_posts;
alter table phpbb_users drop user_can_post ;
[/code]


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-09-11 10:39:27

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,436
Website

Re: Reversing these MySQL statements

cactus wrote:
dibblethewrecker wrote:
INSERT INTO phpbb_config VALUES ('ignore_or_hide_forums', 1);

Basically, could someone supply the safest commands to "undo" these changes, please?  Thanks.[/code]

For the first one, you would have to know what the column name is of the column containing the 'ignore_or_hide_forums' string value.
Then you can delete that entry based on that match...
[code]
delete from phpbb_config where column_name = 'ignore_or_hid_forums';
[/code]

phpbb_config has two columns: config_name and config_value

So will you command delete the entries in both columns based on the match in the first?

Thanks cactus big_smile

Offline

#4 2005-09-11 17:49:41

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Reversing these MySQL statements

yeah.

delete from phpbb_config where config_name = 'ignore_or_hide_forums'; 

"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

Board footer

Powered by FluxBB