BlottoBeats.Server.Database.addVoteToUserTable C# (CSharp) Method

addVoteToUserTable() private method

private addVoteToUserTable ( int userID, int songID, bool vote ) : void
userID int
songID int
vote bool
return void
        private void addVoteToUserTable(int userID, int songID, bool vote)
        {
            string userTable = "user" + userID;
            int voteNum;
            if (vote == true)
            {
                voteNum = 1;
            }
            else
            {
                voteNum = -1;
            }

            MySqlConnection conn = new MySqlConnection(connString);
            MySqlCommand command = conn.CreateCommand();
            SQLNonQuery(conn, "Insert into user" + userID + " (iduser"+userID+",songID,voteUpOrDown) values('" + GetNextAvailableID(userTable) + "','" + songID + "','" + voteNum + "')");
        }