Skip to content
Advertisement

Data from MySQL – If users have the same number of points – show in one row

How can I make if player X has the same number of points as any other player, so that it displays them in 1 row?

table users:

JavaScript

My Query:

JavaScript

Results:

enter image description here

PHP to sort data DESC and display using templates:

JavaScript

Results from PHP and templates:

enter image description here enter image description here

Now we can see that two users have points in the same category (points_first). How can I do to get this effect? What to use?:

enter image description here

Advertisement

Answer

Group the results by the points and use GROUP_CONCAT to concatenate the usernames.

JavaScript

I hope it is helpful!

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement