A rank users order by points


Posted on 16th Feb 2014 07:03 pm by admin

I want to make an insert from table 'rank' , with number (rank) from the cod blow, to fild users.rank ...

set @rank := 0;
select @rank:=@rank+1 'rank', users.username, users.points from users order by points desc;
Code: +------+-------------+--------+
| rank | username | points |
+------+-------------+--------+
| 1 | ropy | 98 |
| 2 | alexcsandru | 17 |
| 3 | bobo | 17 |
| 4 | ovidiu | 5 |
+------+-------------+--------+
How to do??

P.S.: to insert rank in users.rank table... and with a function reload_player_rank() of 30 in 30 minutes (to update new rank in table users.rank) .


A solution please

No comments posted yet

Your Answer:

Login to answer
75 Like 54 Dislike
Previous forums Next forums
Other forums

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called throug

Multiple submit forms inside a mysql array page
Hi all,

Im having trouble to get the beneath script to work the thing i can't seem to get wor

change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

Custom Container in module pool program
Hello everyone,

I have created a custom control in my module pool screen. Now I want to s

JQuery, Masterpage, and Control issue
Hey everyone, I am using JQuery in several sites so I thought it would be best to place the library

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

Multidimensional Array into an Html table, help!
Hello all, I am new to HTML/PHP so any help would be great.

I have a multidimensional array f

Extending Exception to contain method name
I was wondering, if there's a way to extend Exception in such a way, that it would contain name of a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash