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();
|
SQLiteConnection conn = openConnection();
|
||||||
if (conn != null) {
|
if (conn != null) {
|
||||||
try {
|
try {
|
||||||
String dbQuery = SEARCH_TABLE_SELECT + " WHERE " + SEARCH_COL_SEARCH_TERM + " LIKE " + "'%" + searchQuery + "%'";
|
String dbQuery = SEARCH_TABLE_SELECT + " WHERE " + SEARCH_COL_SEARCH_TERM + " LIKE ?";
|
||||||
SQLiteCursor cursor = conn.rawQuery(dbQuery, null);
|
SQLiteCursor cursor = conn.rawQuery(dbQuery, new String[]{"%" + searchQuery + "%"});
|
||||||
if (cursor.moveToFirst()) {
|
if (cursor.moveToFirst()) {
|
||||||
do {
|
do {
|
||||||
res.add(readSearchResult(cursor));
|
res.add(readSearchResult(cursor));
|
||||||
|
|
Loading…
Reference in a new issue