-1
最後的行和列的值,我想最後的值例子獲取sqlLite
ID NAME SURNAME
1 Mark X
2 Alex Z
我想在那裏姓等於Z中的數值,或插入y的驗證碼
的最後一個值DB類
public Cursor getData(){
SQLiteDatabase db = this.getWritableDatabase();
//String selectQuery= "SELECT * FROM "+TABLE_NAME+" ORDER BY column DESC LIMIT 1;";
Cursor cursor = db.rawQuery("SELECT * FROM "+TABLE_NAME,null);
//Cursor cursor = db.rawQuery(selectQuery,null);
return cursor;
}
主要活動
void getDatas(){
Cursor c = helper.getData();
if (c.getCount()==0){
return;
}
StringBuffer buffer = new StringBuffer();
while (c.moveToNext()){
buffer.append(c.getString(2));
}
TEXT=buffer.toString();
}
隨着那我收到例如= XZ而不是隻有ž