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

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

pagination numbering pattern
Hello,

I have following code which works great for pagination. but i have small issue now.

Check before inserting in DB ???
This is my code
---------------
if ( $_POST ['Submit'])
{{
$username = $_POST ['usernm

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

Basic Forum Tutorial
Hi, I'm new to PHP. I want to build a basic forum for my site using PHP and MySQL. I've searched t

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

md5 is it unique
I know this is most likely one of many simple questions that can be found semi easily. But I'm press

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

What are causes of a connection-timeout with fopen()?
Hello! Here is the situation: The server I host my website on just upgraded it's PHP build from 4.4.

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