Android: SQLite, cursor.moveToNext() always return false

view full story

http://stackoverflow.com – The follow statement give me cursor.moveToNexe() == false. Does anyone know what is the matter? Many thanks. (The query statement has output if running in ADB Shell.) String query ="SELECT(SELECT COUNT(*) FROM Table1) as count1, (SELECT COUNT(*) FROM Table2) as count2;"; Cursor mCursor = mDb.rawQuery(query, null); if (mCursor != null) { mCursor.moveToFirst(); } while (cursor.moveToNext()) { //<---------------return false here??? String result_0=cursor.getString(0); } (HowTos)