跳至主要内容

博文

目前显示的是标签为“sqlite”的博文

android sqlite

        SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(MainActivity.this.getString(R.string.db_chat_history), null);         db.execSQL("create table if not exists unreaded(FromWho text,Msg text)");         Cursor cursor = db.rawQuery("select * from unreaded", null);         if(cursor.moveToFirst() && cursor.getCount() >= 1) {             do {                 sendMsg(cursor.getString(cursor.getColumnIndex("FromWho")),cursor.getString(cursor.getColumnIndex("Msg")));             } while (cursor.moveToNext());         }