Skip to content

Commit

Permalink
Update DataHelper.java
Browse files Browse the repository at this point in the history
  • Loading branch information
j50ju authored Sep 11, 2024
1 parent ce9abe3 commit a9ee2ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/com/example/iris/login1/DataHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit a9ee2ff

Please sign in to comment.