How to make instantiated buttons permanent in hierarchy?

I´m trying to add one button whenever something is added to a database. I already did the connection to the DB and put it to add an instantiated button when something is added in it. Here is my code so far

string MyConnection1 = "datasource=...;port=..;username=..;password=..";
        string Query1 = "select Name" +
            " from ..." +
            "ORDER BY ID DESC LIMIT 1;";
        MySqlConnection MyConn1 = new MySqlConnection(MyConnection1);
        MySqlCommand MyCommand1 = new MySqlCommand(Query1, MyConn1);
        MySqlDataReader readr = MyCommand1.ExecuteReader();
        //int Value = MyCommand2.ExecuteNonQuery();
        while (readr.Read())
            nam = Convert.ToString(readr[0]);
            Debug.Log("val = " + nam);

        GameObject newButton = Instantiate(button) as GameObject;
        newButton.transform.SetParent(content.transform, false);

The problem is that it only works on runtime. When I stop the game, the buttons dissapear and I want them to be saved in hierarchy.
Can anyone help me solve this?

well thats a hard task, you can use this example for saving objects created at runtime BUT since is using unity editor it wont work in builds just during editor playmode 1. if you want to use this for builds just save your buttons in some kind of txt or xml that you can parse (or call the DB at the start of the game) and spawn the buttons then, this is also valid for editor (but wont edit unity scene).