-
Posts
5 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
McGee007's Achievements
-
McGee007 started following Mysql Version? , New issue to annoy you with =P , Error on load the plugin and 1 other
-
DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `createTable`(IN `tableName` VARCHAR(200)) BEGIN SET @name = tableName; SET @st = CONCAT(' CREATE TABLE IF NOT EXISTS `' , @name, '` ( `id` INT(4) NOT NULL AUTO_INCREMENT, `name` VARCHAR(50) NULL DEFAULT NULL, `steamid` VARCHAR(18) NULL DEFAULT NULL, `connections` INT(11) NOT NULL DEFAULT 0, `playtime` INT(11) NOT NULL DEFAULT 0, `kills` INT(11) NOT NULL DEFAULT 0, `deaths` INT(11) NOT NULL DEFAULT 0, `bfired` INT(11) NOT NULL DEFAULT 0, `suicides` INT(11) NOT NULL DEFAULT 0, `wounded` INT(11) NOT NULL DEFAULT 0, `c4thrown` INT(11) NOT NULL DEFAULT 0, `satchelsthrown` INT(11) NOT NULL DEFAULT 0, `rocketsfired` INT(11) NOT NULL DEFAULT 0, `tcsdestroyed` INT(11) NOT NULL DEFAULT 0, `chickens` INT(11) NOT NULL DEFAULT 0, `boars` INT(11) NOT NULL DEFAULT 0, `deers` INT(11) NOT NULL DEFAULT 0, `horses` INT(11) NOT NULL DEFAULT 0, `wolves` INT(11) NOT NULL DEFAULT 0, `bears` INT(11) NOT NULL DEFAULT 0, `scientists` INT(11) NOT NULL DEFAULT 0, `helicopters` INT(11) NOT NULL DEFAULT 0, `bradleys` INT(11) NOT NULL DEFAULT 0, `ak47` INT(11) NOT NULL DEFAULT 0, `lr300` INT(11) NOT NULL DEFAULT 0, `m39` INT(11) NOT NULL DEFAULT 0, `sar` INT(11) NOT NULL DEFAULT 0, `m249` INT(11) NOT NULL DEFAULT 0, `hmlmg` INT(11) NOT NULL DEFAULT 0, `l96` INT(11) NOT NULL DEFAULT 0, `bolt` INT(11) NOT NULL DEFAULT 0, `mp5` INT(11) NOT NULL DEFAULT 0, `thompson` INT(11) NOT NULL DEFAULT 0, `custom` INT(11) NOT NULL DEFAULT 0, `pump` INT(11) NOT NULL DEFAULT 0, `doublebarrel` INT(11) NOT NULL DEFAULT 0, `spaz12` INT(11) NOT NULL DEFAULT 0, `m92` INT(11) NOT NULL DEFAULT 0, `python` INT(11) NOT NULL DEFAULT 0, `semipistol` INT(11) NOT NULL DEFAULT 0, `revolver` INT(11) NOT NULL DEFAULT 0, `waterpipe` INT(11) NOT NULL DEFAULT 0, `eoka` INT(11) NOT NULL DEFAULT 0, `compound` INT(11) NOT NULL DEFAULT 0, `crossbow` INT(11) NOT NULL DEFAULT 0, `bow` INT(11) NOT NULL DEFAULT 0, `head_hits` INT(11) NOT NULL DEFAULT 0, `torso_hits` INT(11) NOT NULL DEFAULT 0, `leftarm_hits` INT(11) NOT NULL DEFAULT 0, `rightarm_hits` INT(11) NOT NULL DEFAULT 0, `leftleg_hits` INT(11) NOT NULL DEFAULT 0, `rightleg_hits` INT(11) NOT NULL DEFAULT 0, `leftfoot_hits` INT(11) NOT NULL DEFAULT 0, `rightfoot_hits` INT(11) NOT NULL DEFAULT 0, `prototype17` INT(11) NOT NULL DEFAULT 0, `nailgun` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `steamid` (`steamid`) USING BTREE ) '); PREPARE myStatement FROM @st; EXECUTE myStatement; DEALLOCATE PREPARE myStatement; END$$ DELIMITER ; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `insertStats`(IN `serverPrefix` VARCHAR(50)) BEGIN SET @name = serverPrefix; SET @st = CONCAT(' INSERT INTO `' , @name, '_stats_overall` (name, steamid, playtime, connections, kills, deaths, bfired, suicides, wounded, rocketsfired, c4thrown, satchelsthrown, tcsdestroyed, chickens, boars, deers, horses, wolves, bears, scientists, helicopters, bradleys, ak47, lr300, m39, sar, hmlmg, m249, bolt, l96, mp5, thompson, custom, pump, doublebarrel, spaz12, m92, python, semipistol, revolver, waterpipe, eoka, compound, crossbow, bow, head_hits, torso_hits, leftarm_hits, rightarm_hits, leftleg_hits, rightleg_hits, leftfoot_hits, rightfoot_hits, prototype17, nailgun) SELECT name, steamid, playtime, connections, kills, deaths, bfired, suicides, wounded, rocketsfired, c4thrown, satchelsthrown, tcsdestroyed, chickens, boars, deers, horses, wolves, bears, scientists, helicopters, bradleys, ak47, lr300, m39, sar, hmlmg, m249, bolt, l96, mp5, thompson, custom, pump, doublebarrel, spaz12, m92, python, semipistol, revolver, waterpipe, eoka, compound, crossbow, bow, head_hits, torso_hits, leftarm_hits, rightarm_hits, leftleg_hits, rightleg_hits, leftfoot_hits, rightfoot_hits, prototype17, nailgun FROM `' , @name, '_stats_wipe` WHERE NOT EXISTS (SELECT * FROM ' , @name, '_stats_overall WHERE steamid = ' , @name, '_stats_wipe.steamid) '); PREPARE myStatement FROM @st; EXECUTE myStatement; DEALLOCATE PREPARE myStatement; END$$ DELIMITER ; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `updateData`(IN `serverPrefix` VARCHAR(50)) BEGIN SET @name = serverPrefix; SET @st = CONCAT(' UPDATE ' , @name, '_stats_wipe wipe, ' , @name, '_stats_overall overall SET overall.name = wipe.name, overall.connections = overall.connections + wipe.connections, overall.playtime = overall.playtime + wipe.playtime, overall.kills = overall.kills + wipe.kills, overall.deaths = overall.deaths + wipe.deaths, overall.bfired = overall.bfired + wipe.bfired, overall.suicides = overall.suicides + wipe.suicides, overall.wounded = overall.wounded + wipe.wounded, overall.rocketsfired = overall.rocketsfired + wipe.rocketsfired, overall.c4thrown = overall.c4thrown + wipe.c4thrown, overall.satchelsthrown = overall.satchelsthrown + wipe.satchelsthrown, overall.tcsdestroyed = overall.tcsdestroyed + wipe.tcsdestroyed, overall.chickens = overall.chickens + wipe.chickens, overall.boars = overall.boars + wipe.boars, overall.deers = overall.deers + wipe.deers, overall.horses = overall.horses + wipe.horses, overall.wolves = overall.wolves + wipe.wolves, overall.bears = overall.bears + wipe.bears, overall.scientists = overall.scientists + wipe.scientists, overall.helicopters = overall.helicopters + wipe.helicopters, overall.bradleys = overall.bradleys + wipe.bradleys, overall.ak47 = overall.ak47 + wipe.ak47, overall.lr300 = overall.lr300 + wipe.lr300, overall.m39 = overall.m39 + wipe.m39, overall.sar = overall.sar + wipe.sar, overall.hmlmg = overall.hmlmg + wipe.hmlmg, overall.m249 = overall.m249 + wipe.m249, overall.bolt = overall.bolt + wipe.bolt, overall.l96 = overall.l96 + wipe.l96, overall.mp5 = overall.mp5 + wipe.mp5, overall.thompson = overall.thompson + wipe.thompson, overall.custom = overall.custom + wipe.custom, overall.pump = overall.pump + wipe.pump, overall.doublebarrel = overall.doublebarrel + wipe.doublebarrel, overall.spaz12 = overall.spaz12 + wipe.spaz12, overall.m92 = overall.m92 + wipe.m92, overall.python = overall.python + wipe.python, overall.semipistol = overall.semipistol + wipe.semipistol, overall.revolver = overall.revolver + wipe.revolver, overall.waterpipe = overall.waterpipe + wipe.waterpipe, overall.eoka = overall.eoka + wipe.eoka, overall.compound = overall.compound + wipe.compound, overall.crossbow = overall.crossbow + wipe.crossbow, overall.bow = overall.bow + wipe.bow, overall.head_hits = overall.head_hits + wipe.head_hits, overall.torso_hits = overall.torso_hits + wipe.torso_hits, overall.leftarm_hits = overall.leftarm_hits + wipe.leftarm_hits, overall.rightarm_hits = overall.rightarm_hits + wipe.rightarm_hits, overall.leftleg_hits = overall.leftleg_hits + wipe.leftleg_hits, overall.rightleg_hits = overall.rightleg_hits + wipe.rightleg_hits, overall.leftfoot_hits = overall.leftfoot_hits + wipe.leftfoot_hits, overall.rightfoot_hits = overall.rightfoot_hits + wipe.rightfoot_hits, overall.prototype17 = overall.prototype17 + wipe.prototype17, overall.nailgun = overall.nailgun + wipe.nailgun WHERE overall.steamid = wipe.steamid; '); PREPARE myStatement FROM @st; EXECUTE myStatement; DEALLOCATE PREPARE myStatement; END$$ DELIMITER ; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `wipeTime`(IN `serverPrefix` VARCHAR(50)) BEGIN SET @serverPrefix = serverPrefix; CALL updateData(@serverPrefix); CALL insertStats(@serverPrefix); SET @st = CONCAT('TRUNCATE TABLE ', @serverPrefix, '_stats_wipe'); PREPARE myStatement FROM @st; EXECUTE myStatement; DEALLOCATE PREPARE myStatement; END$$ DELIMITER ; This works for us no issues
-
check this I have the mysql working with that error resolved.
-
check that i put code in my comment for procedures
-
Get https://cdn.mysql.com//Downloads/Connector-Net/mysql-connector-net-8.0.33-noinstall.zip and use the v4.8 folder in it to update the MySql.Data.dll and xml that will go to this location in rust RustDedicated_Data\Managed and save the files cause after the update of rust it needs to be replace each time if you get a mysql error for unsupported type.
-
McGee007 started following Better Statistics
-
Updated sql procedures was missing prototype17, nailgun also get https://cdn.mysql.com//Downloads/Connector-Net/mysql-connector-net-8.0.33-noinstall.zip and use the v4.8 folder in it to update the MySql.Data.dll and xml that will go to this location in rust RustDedicated_Data\Managed and save the files cause after the update of rust it needs to be replace each time if you get a mysql error for unsupported type. DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `createTable`(IN `tableName` VARCHAR(200)) BEGIN SET @name = tableName; SET @st = CONCAT(' CREATE TABLE IF NOT EXISTS `' , @name, '` ( `id` INT(4) NOT NULL AUTO_INCREMENT, `name` VARCHAR(50) NULL DEFAULT NULL, `steamid` VARCHAR(18) NULL DEFAULT NULL, `connections` INT(11) NOT NULL DEFAULT 0, `playtime` INT(11) NOT NULL DEFAULT 0, `kills` INT(11) NOT NULL DEFAULT 0, `deaths` INT(11) NOT NULL DEFAULT 0, `bfired` INT(11) NOT NULL DEFAULT 0, `suicides` INT(11) NOT NULL DEFAULT 0, `wounded` INT(11) NOT NULL DEFAULT 0, `c4thrown` INT(11) NOT NULL DEFAULT 0, `satchelsthrown` INT(11) NOT NULL DEFAULT 0, `rocketsfired` INT(11) NOT NULL DEFAULT 0, `tcsdestroyed` INT(11) NOT NULL DEFAULT 0, `chickens` INT(11) NOT NULL DEFAULT 0, `boars` INT(11) NOT NULL DEFAULT 0, `deers` INT(11) NOT NULL DEFAULT 0, `horses` INT(11) NOT NULL DEFAULT 0, `wolves` INT(11) NOT NULL DEFAULT 0, `bears` INT(11) NOT NULL DEFAULT 0, `scientists` INT(11) NOT NULL DEFAULT 0, `helicopters` INT(11) NOT NULL DEFAULT 0, `bradleys` INT(11) NOT NULL DEFAULT 0, `ak47` INT(11) NOT NULL DEFAULT 0, `lr300` INT(11) NOT NULL DEFAULT 0, `m39` INT(11) NOT NULL DEFAULT 0, `sar` INT(11) NOT NULL DEFAULT 0, `m249` INT(11) NOT NULL DEFAULT 0, `hmlmg` INT(11) NOT NULL DEFAULT 0, `l96` INT(11) NOT NULL DEFAULT 0, `bolt` INT(11) NOT NULL DEFAULT 0, `mp5` INT(11) NOT NULL DEFAULT 0, `thompson` INT(11) NOT NULL DEFAULT 0, `custom` INT(11) NOT NULL DEFAULT 0, `pump` INT(11) NOT NULL DEFAULT 0, `doublebarrel` INT(11) NOT NULL DEFAULT 0, `spaz12` INT(11) NOT NULL DEFAULT 0, `m92` INT(11) NOT NULL DEFAULT 0, `python` INT(11) NOT NULL DEFAULT 0, `semipistol` INT(11) NOT NULL DEFAULT 0, `revolver` INT(11) NOT NULL DEFAULT 0, `waterpipe` INT(11) NOT NULL DEFAULT 0, `eoka` INT(11) NOT NULL DEFAULT 0, `compound` INT(11) NOT NULL DEFAULT 0, `crossbow` INT(11) NOT NULL DEFAULT 0, `bow` INT(11) NOT NULL DEFAULT 0, `head_hits` INT(11) NOT NULL DEFAULT 0, `torso_hits` INT(11) NOT NULL DEFAULT 0, `leftarm_hits` INT(11) NOT NULL DEFAULT 0, `rightarm_hits` INT(11) NOT NULL DEFAULT 0, `leftleg_hits` INT(11) NOT NULL DEFAULT 0, `rightleg_hits` INT(11) NOT NULL DEFAULT 0, `leftfoot_hits` INT(11) NOT NULL DEFAULT 0, `rightfoot_hits` INT(11) NOT NULL DEFAULT 0, `prototype17` INT(11) NOT NULL DEFAULT 0, `nailgun` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `steamid` (`steamid`) USING BTREE ) '); PREPARE myStatement FROM @st; EXECUTE myStatement; DEALLOCATE PREPARE myStatement; END$$ DELIMITER ; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `insertStats`(IN `serverPrefix` VARCHAR(50)) BEGIN SET @name = serverPrefix; SET @st = CONCAT(' INSERT INTO `' , @name, '_stats_overall` (name, steamid, playtime, connections, kills, deaths, bfired, suicides, wounded, rocketsfired, c4thrown, satchelsthrown, tcsdestroyed, chickens, boars, deers, horses, wolves, bears, scientists, helicopters, bradleys, ak47, lr300, m39, sar, hmlmg, m249, bolt, l96, mp5, thompson, custom, pump, doublebarrel, spaz12, m92, python, semipistol, revolver, waterpipe, eoka, compound, crossbow, bow, head_hits, torso_hits, leftarm_hits, rightarm_hits, leftleg_hits, rightleg_hits, leftfoot_hits, rightfoot_hits, prototype17, nailgun) SELECT name, steamid, playtime, connections, kills, deaths, bfired, suicides, wounded, rocketsfired, c4thrown, satchelsthrown, tcsdestroyed, chickens, boars, deers, horses, wolves, bears, scientists, helicopters, bradleys, ak47, lr300, m39, sar, hmlmg, m249, bolt, l96, mp5, thompson, custom, pump, doublebarrel, spaz12, m92, python, semipistol, revolver, waterpipe, eoka, compound, crossbow, bow, head_hits, torso_hits, leftarm_hits, rightarm_hits, leftleg_hits, rightleg_hits, leftfoot_hits, rightfoot_hits, prototype17, nailgun FROM `' , @name, '_stats_wipe` WHERE NOT EXISTS (SELECT * FROM ' , @name, '_stats_overall WHERE steamid = ' , @name, '_stats_wipe.steamid) '); PREPARE myStatement FROM @st; EXECUTE myStatement; DEALLOCATE PREPARE myStatement; END$$ DELIMITER ; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `updateData`(IN `serverPrefix` VARCHAR(50)) BEGIN SET @name = serverPrefix; SET @st = CONCAT(' UPDATE ' , @name, '_stats_wipe wipe, ' , @name, '_stats_overall overall SET overall.name = wipe.name, overall.connections = overall.connections + wipe.connections, overall.playtime = overall.playtime + wipe.playtime, overall.kills = overall.kills + wipe.kills, overall.deaths = overall.deaths + wipe.deaths, overall.bfired = overall.bfired + wipe.bfired, overall.suicides = overall.suicides + wipe.suicides, overall.wounded = overall.wounded + wipe.wounded, overall.rocketsfired = overall.rocketsfired + wipe.rocketsfired, overall.c4thrown = overall.c4thrown + wipe.c4thrown, overall.satchelsthrown = overall.satchelsthrown + wipe.satchelsthrown, overall.tcsdestroyed = overall.tcsdestroyed + wipe.tcsdestroyed, overall.chickens = overall.chickens + wipe.chickens, overall.boars = overall.boars + wipe.boars, overall.deers = overall.deers + wipe.deers, overall.horses = overall.horses + wipe.horses, overall.wolves = overall.wolves + wipe.wolves, overall.bears = overall.bears + wipe.bears, overall.scientists = overall.scientists + wipe.scientists, overall.helicopters = overall.helicopters + wipe.helicopters, overall.bradleys = overall.bradleys + wipe.bradleys, overall.ak47 = overall.ak47 + wipe.ak47, overall.lr300 = overall.lr300 + wipe.lr300, overall.m39 = overall.m39 + wipe.m39, overall.sar = overall.sar + wipe.sar, overall.hmlmg = overall.hmlmg + wipe.hmlmg, overall.m249 = overall.m249 + wipe.m249, overall.bolt = overall.bolt + wipe.bolt, overall.l96 = overall.l96 + wipe.l96, overall.mp5 = overall.mp5 + wipe.mp5, overall.thompson = overall.thompson + wipe.thompson, overall.custom = overall.custom + wipe.custom, overall.pump = overall.pump + wipe.pump, overall.doublebarrel = overall.doublebarrel + wipe.doublebarrel, overall.spaz12 = overall.spaz12 + wipe.spaz12, overall.m92 = overall.m92 + wipe.m92, overall.python = overall.python + wipe.python, overall.semipistol = overall.semipistol + wipe.semipistol, overall.revolver = overall.revolver + wipe.revolver, overall.waterpipe = overall.waterpipe + wipe.waterpipe, overall.eoka = overall.eoka + wipe.eoka, overall.compound = overall.compound + wipe.compound, overall.crossbow = overall.crossbow + wipe.crossbow, overall.bow = overall.bow + wipe.bow, overall.head_hits = overall.head_hits + wipe.head_hits, overall.torso_hits = overall.torso_hits + wipe.torso_hits, overall.leftarm_hits = overall.leftarm_hits + wipe.leftarm_hits, overall.rightarm_hits = overall.rightarm_hits + wipe.rightarm_hits, overall.leftleg_hits = overall.leftleg_hits + wipe.leftleg_hits, overall.rightleg_hits = overall.rightleg_hits + wipe.rightleg_hits, overall.leftfoot_hits = overall.leftfoot_hits + wipe.leftfoot_hits, overall.rightfoot_hits = overall.rightfoot_hits + wipe.rightfoot_hits, overall.prototype17 = overall.prototype17 + wipe.prototype17, overall.nailgun = overall.nailgun + wipe.nailgun WHERE overall.steamid = wipe.steamid; '); PREPARE myStatement FROM @st; EXECUTE myStatement; DEALLOCATE PREPARE myStatement; END$$ DELIMITER ; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `wipeTime`(IN `serverPrefix` VARCHAR(50)) BEGIN SET @serverPrefix = serverPrefix; CALL updateData(@serverPrefix); CALL insertStats(@serverPrefix); SET @st = CONCAT('TRUNCATE TABLE ', @serverPrefix, '_stats_wipe'); PREPARE myStatement FROM @st; EXECUTE myStatement; DEALLOCATE PREPARE myStatement; END$$ DELIMITER ;
- 78 comments
-
- #stats
- #statistics
- (and 5 more)