public bool InsertToScoreboard(SubmitDTO submitDTO) { InsertQuestionList(submitDTO.QuestionList); MySqlCommand SelectQuestionIDCommand = new MySqlCommand("INSERT INTO `scoreboard` ( `user`, `category`, `difficulty`, `amount_of_questions`, `question_list`, `score`, `date`) VALUES(@val1,@val2,@val3,@val4,@val5,@val6, current_timestamp());"); SelectQuestionIDCommand.Parameters.AddWithValue("@val1", submitDTO.UniqueID); SelectQuestionIDCommand.Parameters.AddWithValue("@val2", submitDTO.Category); SelectQuestionIDCommand.Parameters.AddWithValue("@val3", submitDTO.Difficulty); SelectQuestionIDCommand.Parameters.AddWithValue("@val4", 10); SelectQuestionIDCommand.Parameters.AddWithValue("@val5", SelectQuestionListID()); SelectQuestionIDCommand.Parameters.AddWithValue("@val6", submitDTO.Score); return(DatabaseClass.StoreData(SelectQuestionIDCommand, true)); }
public bool InsertToScoreboard(SubmitDTO submitDTO) { return(Context.InsertToScoreboard(submitDTO)); }