Skip to content

Commit 65b50ce

Browse files
committed
Android-SQLiteSearch
1 parent fee1bff commit 65b50ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/ahmadabuhasan/search/DBAccess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void close() {
4343
public ArrayList<HashMap<String, String>> getSearchData(String s) {
4444
ArrayList<HashMap<String, String>> product = new ArrayList<>();
4545
SQLiteDatabase sQLiteDatabase = this.database;
46-
Cursor cursor = sQLiteDatabase.rawQuery("SELECT * FROM data WHERE NameProduct LIKE '%" + s + "%' OR Price LIKE '%" + s + "%' ORDER BY DataId DESC", (String[]) null);
46+
Cursor cursor = sQLiteDatabase.rawQuery("SELECT * FROM data WHERE NameProduct LIKE '%" + s + "%' OR Price LIKE '%" + s + "%' ORDER BY DataId DESC", null);
4747
if (cursor.moveToFirst()) {
4848
do {
4949
HashMap<String, String> map = new HashMap<>();

0 commit comments

Comments
 (0)