I'm a newbie in Android and i'm studying/doing some apps using sqlite. I need build a method that returns the following query
select max(rowid) from DB_TABLE
i did this method, but it doesnt log anything and doesn't return any value. the database opens, creates and insert data in the table normally. somebody can help me???
Using java Syntax Highlighting
- public int getMaxRowID(){
- int x = 0;
- Cursor result = mDB.query(true, DB_TABLE, new String[]{"max(rowid)"}, null, null, null, null, null, null);
- Log.i(TAG, "X = " + x+1 + "fudeu");
- return result.getInt(x);
- }
- }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


