Пример #1
0
    void OnApplicationQuit()
    {
        if (_msCon != null)
        {
            if (_msCon.State.ToString() != "closed")
            {
                _msCon.Close();
                LogTool.Print("MySQL Connection Closed");
            }

            _msCon.Dispose();
        }
    }
Пример #2
0
    void Awake()
    {
        //Don't destroy this important gameobject
        DontDestroyOnLoad(this.gameObject);
        _connectionString = "Server=" + host + ";Database=" + database + ";User="******";Password="******"MySql State: " + _msCon.State);
        }
        catch (Exception e)
        {
            Debug.Log(e);
        }
        LogTool.Print(RunQuery("SELECT * FROM test.user;"));
    }