Saving Void
PHP Code:
public static void Save(Client.GameState client, byte GroupNumber)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
cmd.Insert("chitable").Insert("Name", client.Entity.Name).Insert("LearnedClasses", GroupNumber++)
.Insert("value " + (GroupNumber * 4), client.Chi.ChiValues[GroupNumber * 4])
.Insert("value " + ((GroupNumber * 4) + 1), client.Chi.ChiValues[(GroupNumber * 4) + 1])
.Insert("value " + ((GroupNumber * 4) + 2), client.Chi.ChiValues[(GroupNumber * 4) + 2])
.Insert("value " + ((GroupNumber * 4) + 3), client.Chi.ChiValues[(GroupNumber * 4) + 3])
.Execute();
}
Query
PHP Code:
-- ----------------------------
-- Table structure for `chitable`
-- ----------------------------
DROP TABLE IF EXISTS `chitable`;
CREATE TABLE `chitable` (
`Name` varchar(80) CHARACTER SET utf8 NOT NULL,
`LearnedClasses` mediumint(80) NOT NULL DEFAULT '0',
`Value 0` bigint(80) NOT NULL DEFAULT '0',
`Value 1` bigint(80) NOT NULL DEFAULT '0',
`Value 2` bigint(80) NOT NULL DEFAULT '0',
`Value 3` bigint(80) NOT NULL DEFAULT '0',
`Value 4` bigint(80) NOT NULL DEFAULT '0',
`Value 5` bigint(80) NOT NULL DEFAULT '0',
`Value 6` bigint(80) NOT NULL DEFAULT '0',
`Value 7` bigint(80) NOT NULL DEFAULT '0',
`Value 8` bigint(80) NOT NULL DEFAULT '0',
`Value 9` bigint(80) NOT NULL DEFAULT '0',
`Value 10` bigint(80) NOT NULL DEFAULT '0',
`Value 11` bigint(80) NOT NULL DEFAULT '0',
`Value 12` bigint(80) NOT NULL DEFAULT '0',
`Value 13` bigint(80) NOT NULL DEFAULT '0',
`Value 14` bigint(80) NOT NULL DEFAULT '0',
`Value 15` bigint(80) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;