what i need is how to sum two or more columns with mysql and let php determine the the highest and lowest, by given it sum a position.
here is my code which i earlier tried.
[code=php]
Select sum(score1+scor e2) from whatever table
$x=0
while($row = mysql_fetch_arr ay($result) {
if ($user == $row['user']) {
echo "$user is rank $x out of " . count($result);
break;
} else {
$x++
}
}
[/code]
but i am not getting desired result. need help
here is my code which i earlier tried.
[code=php]
Select sum(score1+scor e2) from whatever table
$x=0
while($row = mysql_fetch_arr ay($result) {
if ($user == $row['user']) {
echo "$user is rank $x out of " . count($result);
break;
} else {
$x++
}
}
[/code]
but i am not getting desired result. need help
Comment