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

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

Just wondering what you think about my site
I am new to phpfreaks i just seen this form and thought it would be cool to see what other thought a

quick question
Hi ..

i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a

C - Reading a file into a byte array
Hi,

I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru

Variables and Include
Code: [Select]<?php

$header = $_COOKIE['mss']['header'];
$body = $_COOKIE['mss']['b

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

image upload, resize THEN submit form
Ok so I have a form that requires the user to upload an image, and then do something with that image

Problem with PHP code- simple contact form
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a contact form wit

PHP arrays into arrays need help
Hello
I am trying to highlight the days on my calendar based on the dates that i have in my datab

insert/update functions for mysql, what do you think?
I am working on two really simple functions that automatically generate (and execute) insert and upd

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