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;
Did you know?Explore Trending and Topic pages for more stories like this.
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

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

IIS & NW MII on the same server
Hi,

We're weighing the possibility to run both IIS and MII (NetWeaver) on the same server

Question handling xml data
Hello,

I have sucessfull followed this tutorial
http://www.phpfreaks.com/tutorial/handlin

Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav

What are the two different files you download to update kernel?
What are the two different files you download to update kernel?

Floating Point Precision Loss
I'm writing a program to draw a three-dimensional cube (with a corner cut off) without using any 3D

Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rew

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

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

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