View Single Post
  #6  
Old 07-27-2018, 02:12 PM
HuginnNavarita's Avatar
HuginnNavarita
Fire Beetle
 
Join Date: Jul 2018
Location: USA,SE,NO & IS
Posts: 19
Default

what I do is I make a backup of the table that I want to mess with, when I make that backup I add this function....

Quote:
DROP TABLE IF EXISTS `rule_values`;
then the .SQL file will look like this...


Quote:
DROP TABLE IF EXISTS `rule_values`;
CREATE TABLE `rule_values` (
`ruleset_id` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
`rule_name` varchar(64) NOT NULL DEFAULT '',
`rule_value` varchar(30) NOT NULL DEFAULT '',
`notes` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
(after this statment the SQL inserts all the data)

this means that if you fuck anything up, all you need todo is import this SQL file that contains everything as it was before the fuckup, the DROP TABLE IF EXISTS means just that, it will kill the rule_values table and replace it with this one.

I find this useful for edit of things you would do often, for example the table inventory contains everything that you have in your bags and on you by ID of items, charID is the character, so I would take craploads of food and water from one character and copy paste it to all others, when done, just upload the SQL file and bing-bara-boom clone effect.
__________________
'DONKEY STYLE'
The art of Donking around on your own private server with no goal or end in sight!
Reply With Quote