I'm kind of confused what i should do here. Here is my picture of database structure:
So what i want to do is select all the rows and add the cash/points a user accumulated from individual rows, and finally pull all the rows and sort them based on the number of rows per each user, Descending, where the user with the most "entries" or rows in the table are listed first. Any idea on how i can do that?
Not 100% what you're asking, but this might help to get you started
Code:
mysql_query("SELECT SUM(cash), SUM(points) FROM table WHERE (Your parameters go here)";
That will return two arrays, one is the sum of the cash one, and the other is the sum of the points accumulated, depending on what you're searching for.
Can it just be so it counts the number of rows each user has and lists them by the most to the least?
So its like this:
User
1
1
1
2
2
66
99
22
Where the user with ID of 1, will be listed first, and 2 second, and 66, 99, 22 listed last.
Sounds good.
How can i make it numbered in a list, like:
Place | Username | Entries
1 test 97
2 dddddd 85
3 testttt 75
4 fdasf 65
5 dsffsd 55
Where i can list it by place, and have numbers accompany it? Would i use an ordered list <ol> ?