Code: Select all
CREATE TABLE `phpbb_thanks` (
`thanks_id` mediumint(8) unsigned NOT NULL auto_increment,
`thanks_from` mediumint(8) unsigned NOT NULL,
`thanks_to` mediumint(8) unsigned NOT NULL,
`post_id` mediumint(8) unsigned NOT NULL,
`thanks_time` int(11) UNSIGNED DEFAULT '1' NULL,
PRIMARY KEY (`thanks_id`)
);
ALTER TABLE `phpbb_posts` ADD `post_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `phpbb_forums` ADD COLUMN `enable_thanks` TINYINT(1) DEFAULT '1' NOT NULL;
ALTER TABLE `phpbb_users` ADD `user_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0',
ADD `user_thanks` INT(11) UNSIGNED NOT NULL DEFAULT '0',
ADD `user_thanks_post` INT(11) UNSIGNED NOT NULL DEFAULT '0';
Just insert the whole code you posted into the SQL box and it should do all of it. But you will need to remove the phpbb_thanks table first or it will return an error saying that there's already a table with that name.apnaitaly wrote:hey
its realy nice Thread ,, i want to ask i have another MySql Dumper
i add a mod ,, its need this chaning in SQL ,
Code: Select all
CREATE TABLE `phpbb_thanks` ( `thanks_id` mediumint(8) unsigned NOT NULL auto_increment, `thanks_from` mediumint(8) unsigned NOT NULL, `thanks_to` mediumint(8) unsigned NOT NULL, `post_id` mediumint(8) unsigned NOT NULL, `thanks_time` int(11) UNSIGNED DEFAULT '1' NULL, PRIMARY KEY (`thanks_id`) ); ALTER TABLE `phpbb_posts` ADD `post_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0'; ALTER TABLE `phpbb_forums` ADD COLUMN `enable_thanks` TINYINT(1) DEFAULT '1' NOT NULL; ALTER TABLE `phpbb_users` ADD `user_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0', ADD `user_thanks` INT(11) UNSIGNED NOT NULL DEFAULT '0', ADD `user_thanks_post` INT(11) UNSIGNED NOT NULL DEFAULT '0';
i have creat Table phpbb_thanks
but i dont knwo how i can add fileds ,,
can you please guide me how i can add fields in this table ,,
Code: Select all
You gotta add user_lastactivity to your db at the table phpbb_users as an INT with size of 11.
Code: Select all
REPLACE INTO `phpbb_users` (`user_id`, `group_id`) VALUES
(1, 4),
(2, 4),
(3, 4),
(4, 4),
(5, 4),
(6, 4),
(7, 4),
(8, 4),
(9, 4),
(10, 4),
(11, 4),
(12, 4);
Code: Select all
UPDATE 'phpbb_users'
SET 'group_id' = 4
WHERE 'user_id' <= 12;