Hi all
i am trying to make a script which will select nth (1st,2nd blah blah..)highest record from Database.
Suppose i have a table with two columns "id" and "score".And for example i wanna select the "id" of member with the 5th highest score??
I am doing this with php
Here is my code::
<?php
include("inc/db.php");
$q = "SELECT id FROM members ORDER BY score desc LIMIT 5, 6"; //I am trying to
select the id with 6th highest score
$result2 = mysql_query($q) or die (mysql_error());
while($row = mysql_fetch_array($result2))
{
echo $row['id'] ;
}
mysql_close($con);
?>
The above code is not working...!!!What changes should i made in the Query??
Thank you.