开发者

Need some SQLite QuicK Help Android

开发者 https://www.devze.com 2023-03-06 13:34 出处:网络
so I have: public Cursor fetchnondownloaded(){ return mDb.query(DATABASE_TABLE, new String [] {KEY_TITLE, KEY_URL}, \"downloaded = 0\", null, null, null, null, \"1\");

so I have:

public Cursor fetchnondownloaded(){
    return mDb.query(DATABASE_TABLE, new String [] {KEY_TITLE, KEY_URL}, "downloaded = 0", null, null, null, null, "1");
}

and I was wondering how do I get those two strings KEY_TITLE and KEY_URL o开发者_如何学编程ut of that query.


For title is something like that:

int titleCol = cursor.getColumnIndex(KEY_TITLE);
String title = cursor.getString(titleCol);

I recommend notepad tutorial:

http://developer.android.com/guide/tutorials/notepad/index.html

0

精彩评论

暂无评论...
验证码 换一张
取 消