app/src/main/java/com/basic/security/dao/SqliteManager.java
@@ -135,4 +135,27 @@ return this; } } public static Map<String, String> findById(String table, String id) { Cursor cursor = null; try { String sql = "select * from "+table+" where id = '" + id + "'"; if (Constants.printSql) { System.out.println("findById="+sql); } cursor = DatabaseManager.getDatabase().rawQuery(sql, null); if (cursor.moveToFirst()) { return cursorToModelAdapter(cursor, table); } } catch (Exception e) { e.printStackTrace(); } finally { if (cursor != null) cursor.close(); } return null; } }