From 68a831a396ed965c946c7469ea1c156fb059db32 Mon Sep 17 00:00:00 2001 From: zhangdixi <617017863@qq.com> Date: Fri, 16 Jun 2017 20:08:48 +0800 Subject: [PATCH] =?UTF-8?q?#5=20#40=20=E7=AC=AC=E4=BA=94=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Net1414080903105MySqlOpenHelper.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 AndroidLabs/app/src/main/java/edu/hzuapps/androidlabs/homeworks/net1414080903105/Net1414080903105MySqlOpenHelper.java diff --git a/AndroidLabs/app/src/main/java/edu/hzuapps/androidlabs/homeworks/net1414080903105/Net1414080903105MySqlOpenHelper.java b/AndroidLabs/app/src/main/java/edu/hzuapps/androidlabs/homeworks/net1414080903105/Net1414080903105MySqlOpenHelper.java new file mode 100644 index 00000000..bc5c4df2 --- /dev/null +++ b/AndroidLabs/app/src/main/java/edu/hzuapps/androidlabs/homeworks/net1414080903105/Net1414080903105MySqlOpenHelper.java @@ -0,0 +1,30 @@ +package edu.hzuapps.androidlabs.homeworks.net1414080903105; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; + +/** + * Created by Administrator on 2017/6/16. + */ + +public class Net1414080903105MySqlOpenHelper extends SQLiteOpenHelper { + public Net1414080903105MySqlOpenHelper(Context context) { + super(context, "football", null, 1); + } + + @Override + public void onCreate(SQLiteDatabase db) { + db.execSQL("create table info(" + + "name varchar(20)," + + "age integer," + + "height double," + + "weight double," + + "nation varchar(20));"); + } + + @Override + public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { + + } +}