Re: how do i select this list

From: Date: Wed, 15 Mar 2006 17:16:38 +0000
Subject: Re: how do i select this list
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-231959@lists.php.net to get a copy of this message
THANKS THAT WORKED GREAT ""João Cândido de Souza Neto"" <joao@consultorweb.cnt.br> wrote in message news:7F.69.55982.B9948144@pb1.pair.com... > $query = mysql_query("SELECT * FROM leaderboard WHERE comp_id = $comp_id > ORDER by points DESC, margin ASC "); > > Mark wrote: > >> The query below gives me a list of usernames with the highest point score >> at the top. There is also a secondary points list which i need to use to >> rank players if there POINTS are the same. >> >> ie: >> username points margin >> paul 26 24 >> mark 23 11 >> john 23 10 >> >> I want to rank 'john above 'mark' as his margin points are lower. I >> can't >> rank by margin alone and i need ranking by points (Desc) first then by >> lowest margin. >> how can i change this statement below to achieve this. >> >> Thanks >> >> $query = mysql_query("SELECT * FROM leaderboard WHERE comp_id = $comp_id >> ORDER by points DESC "); > > -- > --------------------------------------------------- > João Cândido de Souza Neto > Web Developer

« previous php.general (#231959) next »