From a9ee2ff9f16cdc13a30231102301b5fdd1fcfdeb Mon Sep 17 00:00:00 2001 From: j50ju <155741428+j50ju@users.noreply.github.com> Date: Wed, 11 Sep 2024 08:50:33 +0800 Subject: [PATCH] Update DataHelper.java --- app/src/main/java/com/example/iris/login1/DataHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/iris/login1/DataHelper.java b/app/src/main/java/com/example/iris/login1/DataHelper.java index bc47f04..8ccf581 100644 --- a/app/src/main/java/com/example/iris/login1/DataHelper.java +++ b/app/src/main/java/com/example/iris/login1/DataHelper.java @@ -243,7 +243,8 @@ public String[] getImageOrder() { //nested query - @SuppressLint("Recycle") Cursor values = db.rawQuery("SELECT icon from animal_names a ORDER BY (SELECT Count(_id) from users u WHERE (u.profileIcon = a.icon)) DESC", null); + @SuppressLint("Recycle") Cursor values = db.rawQuery("SELECT icon from animal_names a ORDER BY (SELECT Count(_id) from users u WHERE (u.profileIcon = a.icon)) DESC, RANDOM()", null); + Log.d("DataHelper" , "sql query: "+values.toString());