public static Insert ( string query ) : void | ||
query | string | |
Результат | void |
private void Write_Click(object sender, EventArgs e) { uint[] SpellFamilyFlags = _tvFamilyTree.GetMask(); // spell comment var comment = String.Format("-- ({0}) {1}", ProcInfo.SpellProc.ID, ProcInfo.SpellProc.SpellNameRank); // drop query var drop = String.Format("DELETE FROM `spell_proc_event` WHERE `entry` IN ({0});", ProcInfo.SpellProc.ID); // insert query var insert = String.Format("INSERT INTO `spell_proc_event` VALUES ({0}, 0x{1:X2}, 0x{2:X2}, 0x{3:X8}, 0x{4:X8}, 0x{5:X8}, 0x{6:X8}, 0x{7:X8}, 0x{8:X8}, 0x{9:X8}, 0x{10:X8}, 0x{11:X8}, 0x{12:X8}, 0x{13:X8}, {14}, {15}, {16});", ProcInfo.SpellProc.ID, _clbSchools.GetFlagsValue(), _cbProcFitstSpellFamily.SelectedValue.ToUInt32(), SpellFamilyFlags[0], 0, 0, SpellFamilyFlags[1], 0, 0, SpellFamilyFlags[2], 0, 0,// пока что так, пока не пойму как... _clbProcFlags.GetFlagsValue(), _clbProcFlagEx.GetFlagsValue(), _tbPPM.Text.Replace(',', '.'), _tbChance.Text.Replace(',', '.'), _tbCooldown.Text.Replace(',', '.')); _rtbSqlLog.AppendText(comment + "\r\n" + drop + "\r\n" + insert + "\r\n\r\n"); _rtbSqlLog.ColorizeCode(); if (MySQLConnect.Connected) { MySQLConnect.Insert(drop + insert); } ((Button)sender).Enabled = false; }
private void SqlToBase_Click(object sender, EventArgs e) { if (MySQLConnect.Connected) { MySQLConnect.Insert(_rtbSqlLog.Text); } else { MessageBox.Show("Can't connect to database!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }