Hi. So i don't want more then one row with the same name so they query should only be executed once and when there is already an entry in the database it shouldn't be executed. Edit: Ok i've got the solution for the problem. SOLUTION: Code: sqlConnection = new MySqlConnection(dbConnect); sqlConnection.Open(); string NAME = player.name; if (sqlConnection.State == System.Data.ConnectionState.Open) //Connection is open { MySqlCommand commandRead = new MySqlCommand("SELECT * FROM TABLE WHERE `Name`='" + NAME + "'", sqlConnection); MySqlCommand Create = new MySqlCommand("INSERT INTO TABLE (`Name`) VALUES ('" + NAME + "')", sqlConnection); sqlReader = commandRead.ExecuteReader(); if (sqlReader.HasRows) { //Entry was found } else { //Entry wasn't found sqlReader.Close(); //Close the reader Create.ExecuteNonQuery(); //Execute the insert string as query API.consoleOutput("Created Entry for: " + NAME); } sqlConnection.Close(); } }