public void UploadEmoteValues(EmoteInfo aEmoteInfo) { string query = "UPDATE emoteinfo SET CurrentValue = " + aEmoteInfo.GetValue() + ", LowestValue = " + aEmoteInfo.GetLowestValue() + ", HighestValue = " + aEmoteInfo.GetHighestValue() + ", AmountBought = " + aEmoteInfo.GetAmountBought() + ", AmountSold = " + aEmoteInfo.GetAmountSold() + ", Average = " + aEmoteInfo.GetAverage() + " WHERE EmoteName = '" + aEmoteInfo.GetName() + "'"; MySqlCommand cmd = new MySqlCommand(query, m_Connection); if (m_Connection.Ping() == false) { m_Connection.Open(); } cmd.ExecuteNonQuery(); this.CloseConnection(); return; }
public void RecordHistory(EmoteInfo aEmoteInfo) { string query = "INSERT INTO emoterecords VALUES (" + aEmoteInfo.GetID() + ", CURRENT_TIMESTAMP, " + aEmoteInfo.GetValue() + ", " + aEmoteInfo.GetAverage() + ")"; MySqlCommand cmd = new MySqlCommand(query, m_Connection); if (m_Connection.Ping() == false) { m_Connection.Open(); } cmd.ExecuteNonQuery(); this.CloseConnection(); return; }