Ejemplo n.º 1
0
    void Start()
    {
        try
        {
            MySqlDB mysql = new  MySqlDB();
            //mysql.CreateTableAutoID("momo",new string[]{"id","name","qq","email","blog"}, new string[]{"int","text","text","text","text"});
            //mysql.InsertInto("momo",new string[]{"name","qq","email","blog"},new string[]{"xuanyusong","289187120","*****@*****.**","xuanyusong.com"});
            //mysql.InsertInto("momo",new string[]{"name","qq","email","blog"},new string[]{"ruoruo","34546546","*****@*****.**","xuanyusong.com"});

            //DataSet ds  = mysql.SelectWhere("momo",new string[]{"name","qq"},new string []{"id"},new string []{"="},new string []{"1"});
            DataTable dt = mysql.SelectLimitLines("momo",0,100);
            if(dt != null)
            {
                foreach (DataRow row in dt.Rows)
                {
                   foreach (DataColumn column in dt.Columns)
                   {
                        Debug.Log(row[column]);
                   }
                }
            }

             //mysql.UpdateInto("momo",new string[]{"name","qq"},new string[]{"'ruoruo'","'11111111'"}, "email", "'*****@*****.**'"  );
             //mysql.Delete("momo",new string[]{"id","email"}, new string[]{"1","'*****@*****.**'"}  );
             mysql.Close();
        }catch(Exception e)
        {
            Error = e.Message;
        }
    }
    void Start()
    {
        Application.runInBackground = true;
        //Screen.SetResolution(804, 673, false);
        mysqldb = new MySqlDB();

        DataTable dt = mysqldb.SelectLimitLines(tableName, startLine, 1);
        linesPerFrame = int.Parse(dt.Rows[0][1].ToString());
        startLine++;
        InvokeRepeating("ReadOneFrameFromMySql", 0f, interval);
    }