diff --git a/src/acr/browser/lightning/HistoryDatabaseHandler.java b/src/acr/browser/lightning/HistoryDatabaseHandler.java index fd5e384..749b184 100644 --- a/src/acr/browser/lightning/HistoryDatabaseHandler.java +++ b/src/acr/browser/lightning/HistoryDatabaseHandler.java @@ -115,7 +115,7 @@ public class HistoryDatabaseHandler extends SQLiteOpenHelper { List itemList = new ArrayList(); // select query String selectQuery = "SELECT * FROM " + TABLE_HISTORY + " WHERE " + KEY_TITLE + " LIKE '%" - + search + "%' OR " + KEY_URL + " LIKE '%" + search + "%'"; + + search + "%' OR " + KEY_URL + " LIKE '%" + search + "%' LIMIT 5"; Cursor cursor = mDatabase.rawQuery(selectQuery, null); // looping through all rows and adding to list @@ -139,7 +139,7 @@ public class HistoryDatabaseHandler extends SQLiteOpenHelper { public List getLastHundredItems() { List itemList = new ArrayList(); - String selectQuery = "SELECT * FROM " + TABLE_HISTORY; + String selectQuery = "SELECT * FROM " + TABLE_HISTORY; Cursor cursor = mDatabase.rawQuery(selectQuery, null); int counter = 0;