Sqlite how to get string items using cursor

前端 未结 5 1843
鱼传尺愫
鱼传尺愫 2020-12-18 06:38
public Cursor getImages(long rowId) throws SQLException
    {
        Cursor mCursor =
                db.rawQuery(\"select * from Pictures WHERE id=\" + rowId + \";         


        
5条回答
  •  粉色の甜心
    2020-12-18 06:46

    You should do it like this:

    c1.getString(cursor.getColumnIndex("pic"));

    and

    c1.getString(cursor.getColumnIndex("comment"));

提交回复
热议问题