mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-23 13:26:15 +03:00
Bug fixed: move where before group by
This commit is contained in:
parent
76204e39db
commit
789b2e20d1
1 changed files with 3 additions and 2 deletions
|
@ -391,8 +391,9 @@ public class NotesDatabase extends AbstractNotesDatabase {
|
|||
// Weird problem: If I use ? instead of concat directly, there is no result in the join table
|
||||
// TODO: Find a way to use ? instead of concat.
|
||||
String rawQuery = "SELECT " + category_title + ", COUNT(*) FROM " + table_category + " INNER JOIN " + table_notes +
|
||||
" ON " + category_id + " = " + note_title + " GROUP BY " + category_id +
|
||||
" WHERE " + table_category + "." + key_account_id + " = " + accountId;
|
||||
" ON " + category_id + " = " + note_title + " WHERE " + table_category + "." + key_account_id + " = " + accountId +
|
||||
" GROUP BY " + category_id;
|
||||
|
||||
Cursor cursor = getReadableDatabase().rawQuery(rawQuery, null);
|
||||
List<NavigationAdapter.NavigationItem> categories = new ArrayList<>(cursor.getCount());
|
||||
while (cursor.moveToNext()) {
|
||||
|
|
Loading…
Reference in a new issue