diff options
| -rw-r--r-- | main/src/cgeo/geocaching/DataStore.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java index 11c5a9a..f5af25e 100644 --- a/main/src/cgeo/geocaching/DataStore.java +++ b/main/src/cgeo/geocaching/DataStore.java @@ -3167,16 +3167,10 @@ public class DataStore { } public static String[] getSuggestions(final String table, final String column, final String input) { - Cursor cursor = database.query( - true, - table, - new String[] { column }, - column + " LIKE ?", - new String[] { getSuggestionArgument(input) }, - null, - null, - column, - null); + Cursor cursor = database.rawQuery("SELECT DISTINCT " + column + + " FROM " + table + + " WHERE " + column + " LIKE ?" + + " ORDER BY " + column + " COLLATE NOCASE ASC;", new String[] { getSuggestionArgument(input) }); return getFirstColumn(cursor); } |
