Hey,
I have a table called streak.
the thought process behind this table is to keep track of wins and loses.
every time a win or los is reported... this table is updated.
that part works fine..
What i'm trying to do is produce a ranking number. As in... give a number of where u stand with all users in the streak table. the more wins you have.. the lower your ranking score will be.
so i did this..
//get there overall Rank
$rank_string=("SELECT username FROM streak ORDER BY `wins`");
$rank_query=mysql_query($rank_string, $armada);
if(!$rank_query)
{//start of if statment (throw error)
$code=='13';
require('pages/error.php');
}//end of if statment (throw error)
if($rank_query and !isset($error))
{//start of if statment (count overall rank)
while($rank_result=mysql_fetch_assoc($rank_query))
{//start of if while statment (give count)
$db_useranme=$rank_result['username'];
$over_all='1'+$over_all_1;
echo $username.'<br />';
if($db_useranme == $username and !isset($stop))
{//start of if statment (hold count to display)
$overall_rank=$over_all;
echo $overall_rank;
$stop='yes';
}//end of if statment (hold count to display)
else $over_all_1=$over_all;
}//end of if while statment (give count)
which is not working... the count it outputs is the totle number of users in the streak table (which is three)
basically what can i use other then while to through a loup?
should i try the whole array thing?