- 最后登录
- 2016-8-29
- 注册时间
- 2012-8-25
- 阅读权限
- 90
- 积分
- 23585
- 纳金币
- 20645
- 精华
- 62
|
- using UnityEngine;
-
- using System.Collections;
-
- using System.Data;
-
- public class poplist : MonoBehaviour {
-
- public UILabel lab;
-
- // Use this for initialization
-
- void Start () {
-
- }
-
- MysqlDbAccess mydb=new MysqlDbAccess ();
-
- // Update is called once per frame
-
- void Update () {
-
- }
-
- void OnSelectionChange (string val)
-
- {
-
- // Debug.Log(“OnSelect”+val);
-
- switch (val)
-
- {
-
- case “显示1”: lab.text=“数字1”; break;
-
- //case “显示2”: lab.text=“数字2”; break;
-
- case “显示2”: Application.LoadLevel(3); break;
-
- case “显示3”: IDataReader reader1=mydb.doQuery(“select id from member where name='lmm‘”);
-
- if (reader1.Read()){
-
- Debug.Log(“查询成功”);}
-
- else Debug.Log(“查询失败”);
-
- break;
-
- case “显示4”: bool b1=mydb.ist(“insert into member(name,password) values('zp','123')”);
-
- mydb.closeSqlConnection(); Debug.Log(“插入成功”); break;
-
- }
-
- }
-
- }
复制代码 |
|