Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

database updating...

Newbie Spellweaver
Joined
Jan 2, 2007
Messages
48
Reaction score
0
how i can make that one database updates another?
example i have one database installed and i have one more but i want it to only add the parts that were not in old database , do not erasing anythig
example in my db i have table with data1 , and there are data2 on other database , how to make only to add data2 to data 1 not to erasing table1 and making new table1 with data2 only?
 
Newbie Spellweaver
Joined
Apr 23, 2005
Messages
31
Reaction score
0
Edit the query. Open your so-called sql update file and delete the lines you don't want to be added. Ex: you just want to get the item_template table that seems to be more updated, then delete everything from the file leaving the "create table item_template" and the "insert into item_template" lines. Also, you might want to drop your executed item_template table in your sql server before re-executing your newly made db update file. Just remember to backup your files before doing everything I said.
 
Newbie Spellweaver
Joined
Jan 2, 2007
Messages
48
Reaction score
0
ironfalcon but if it will update mustn't i change Create table to update table or no?
example:
CREATE TABLE `item_loot_template` (
to
UPDATE TABLE `item_loot_template` (
or no?
i must use sqlyoug or anything else?
i want to learn to insert data in tables , if i need that , i must only leave lines isert yeah?
 
Newbie Spellweaver
Joined
Jan 2, 2007
Messages
48
Reaction score
0
DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
`id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Identifier',
`username` varchar(16) NOT NULL default '',
`password` varchar(28) NOT NULL default '',
`gmlevel` tinyint(3) unsigned NOT NULL default '0',
`sessionkey` longtext,
`email` varchar(50) NOT NULL default '',
`joindate` timestamp NOT NULL default CURRENT_TIMESTAMP,
`banned` tinyint(3) unsigned NOT NULL default '0',
`last_ip` varchar(30) NOT NULL default '127.0.0.1',
`failed_logins` int(11) unsigned NOT NULL default '0',
`locked` tinyint(3) unsigned NOT NULL default '0',
`last_login` timestamp NOT NULL default '0000-00-00 00:00:00',
`online` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_username` (`username`),
KEY `idx_banned` (`banned`),
KEY `idx_gmlevel` (`gmlevel`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Account System';
what i must change in those lines to update the table , no to creat or drop?
 
Back
Top