You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitproject/src/MyApplicatio n/java/com/example/myapplication/weather/DatabaseHelper.java

24 lines
762 B

package com.example.myapplication.weather;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DatabaseHelper extends SQLiteOpenHelper {
private static final int VERSION = 1;
private static final String NAME = "weather";
public DatabaseHelper(Context context){
super(context,NAME,null,VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table weather (_id INTEGER PRIMARY KEY AUTOINCREMENT,date text,max_temp text,min_temp text,text text,humidity text,pressure text,wind text,icon text)");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}