[Help] WILLING TO PAY 20$ FOR FIX!

RetroAddict

Member
Mar 29, 2017
43
6
[HELP] Group Sorting based on User ID (NOT DATE)

I'm stuck with something for like a couple days and I'm using Comet Emulator.
Everything works fine besides the Group Sorting and I figured out like
if User A registered first at the hotel he will be on top of the group members list
and if User B registered on the hotel after User A he will get always sorted under User A
I want it to sort based on Date!

THIS IS THE CODE I FOUND ABOUT THE SORT FUNCTION:
You must be registered for see images attach

How it looks :

You must be registered for see images attach


If anybody knows how to fix tell me!
 
Last edited:

Silenos

Obsessed.
Aug 7, 2017
104
65
Hello my dear friends,
this person will waste your time.

See here: and a screenshot of our previous conversation here: .
He also said he had fixed many bugs himself and extended/improved Comet a lot - but he was not able to sort this out since 4 days.
Can you imagine? Being hardstuck 4 days for this LUL

If your database query doesn't include a particular order and you also don't sort the List, the data will have the same order as it is in the table - very simple logic.
Edit: Since you wanna sort objects, you should actually know the interfaces Comparable and Comparator, or? :) (I do, as a person who never uses Java for his own projects)
 
Last edited:

RetroAddict

Member
Mar 29, 2017
43
6
I'm stuck with something for like a couple days and I'm using Comet Emulator.
Everything works fine besides the Group Sorting and I figured out like
if User A registered first at the hotel he will be on top of the group members list
and if User B registered on the hotel after User A he will get always sorted under User A



If anybody in which file or what this is called please tell me!
Hello my dear friends,
this person will waste your time.

See here: and a screenshot of our previous conversation here: .
He also said he had fixed many bugs himself and extended/improved Comet a lot - but he was not able to sort this out since 4 days.
Can you imagine? Being hardstuck 4 days for this LUL

If your database query doesn't include a particular order and you also don't sort the List, the data will have the same order as it is in the table - very simple logic.
Edit: Since you wanna sort objects, you should actually know the interfaces Comparable and Comparator, or? :) (I do, as a person who never uses Java for his own projects)
U really think im that big of a retard i already sorted it in the db
Post automatically merged:

U really think im that big of a retard i already sorted it in the db
SELECT * FROM group_memberships WHERE group_id = ? ORDER BY access_level, date_joined
 
Last edited:

Hypothesis

Programmer
Jan 6, 2019
524
361
In this query:
Code:
SELECT * FROM group_memberships WHERE group_id = ? ORDER BY access_level, date_joined
Why is it collecting from "WHERE group_id = ?," shouldn't it be using a variable, not a ? symbol.

Sorry don't quote me if that's supposed to be like that, I don't know Java.
 

Pollak

Active Member
Oct 12, 2017
161
51
In this query:
Code:
SELECT * FROM group_memberships WHERE group_id = ? ORDER BY access_level, date_joined
Why is it collecting from "WHERE group_id = ?," shouldn't it be using a variable, not a ? symbol.

Sorry don't quote me if that's supposed to be like that, I don't know Java.
You can use ? for define after something. I never used but exists.
 

olliedean

ollie.cool
Jan 28, 2013
433
107
In this query:
Code:
SELECT * FROM group_memberships WHERE group_id = ? ORDER BY access_level, date_joined
Why is it collecting from "WHERE group_id = ?," shouldn't it be using a variable, not a ? symbol.

Sorry don't quote me if that's supposed to be like that, I don't know Java.

I imagine using question marks is to bind params in the query, preventing SQL injection, like in PHP.
 

Users who are viewing this thread

Top