Fix sql query
This commit is contained in:
parent
b8f50b78d8
commit
aca26438db
1 changed files with 2 additions and 2 deletions
|
@ -65,8 +65,8 @@ public class WikivoyageDbHelper {
|
|||
SQLiteConnection conn = openConnection();
|
||||
if (conn != null) {
|
||||
try {
|
||||
String dbQuery = SEARCH_TABLE_SELECT + " WHERE " + SEARCH_COL_SEARCH_TERM + " LIKE " + "'%" + searchQuery + "%'";
|
||||
SQLiteCursor cursor = conn.rawQuery(dbQuery, null);
|
||||
String dbQuery = SEARCH_TABLE_SELECT + " WHERE " + SEARCH_COL_SEARCH_TERM + " LIKE ?";
|
||||
SQLiteCursor cursor = conn.rawQuery(dbQuery, new String[]{"%" + searchQuery + "%"});
|
||||
if (cursor.moveToFirst()) {
|
||||
do {
|
||||
res.add(readSearchResult(cursor));
|
||||
|
|
Loading…
Reference in a new issue