Skip to content

Commit

Permalink
Android-SQLiteSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
eby8zevin committed Feb 13, 2022
1 parent fee1bff commit 65b50ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/ahmadabuhasan/search/DBAccess.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void close() {
public ArrayList<HashMap<String, String>> getSearchData(String s) {
ArrayList<HashMap<String, String>> product = new ArrayList<>();
SQLiteDatabase sQLiteDatabase = this.database;
Cursor cursor = sQLiteDatabase.rawQuery("SELECT * FROM data WHERE NameProduct LIKE '%" + s + "%' OR Price LIKE '%" + s + "%' ORDER BY DataId DESC", (String[]) null);
Cursor cursor = sQLiteDatabase.rawQuery("SELECT * FROM data WHERE NameProduct LIKE '%" + s + "%' OR Price LIKE '%" + s + "%' ORDER BY DataId DESC", null);
if (cursor.moveToFirst()) {
do {
HashMap<String, String> map = new HashMap<>();
Expand Down

0 comments on commit 65b50ce

Please sign in to comment.