Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int highestRoute() {
- SQLiteDatabase db = getReadableDatabase();
- int highRoute = 0;
- try {
- Cursor results = db.rawQuery("SELECT MAX(" + ROUTE_NUMBER + ") FROM " + TABLE_NAME, null);
- if (results.moveToFirst()) {
- highRoute = results.getInt(0);
- }
- results.close();
- } catch (Exception e) {
- Log.e(FixOpenHelper.class.getName(), "Unable to get highestRoute.", e);
- }
- return highRoute;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement