Thank you for the reply Rudy.
It appears that the result set includes the wrong value for scoreTime but the correct fbname.
I could amend my code to remove the evil "select star" as follows:
Code:
$sql = "SELECT fname, lname, fbname, MIN(CAST(scoreTime AS DECIMAL( 30, 2 ))) AS f1 FROM score_t GROUP BY fbname ORDER BY f1 LIMIT 0 , 100";
My query seems to pull out the correct order in terms of who got the lowest scores but it does not pull out the lowest score for each of these users. So whatever value of scoreTime is being returned in the results is wrong for some reason.
So basically if I use the following to trace the results
Code:
while ($row = mysql_fetch_array($mysql_result)) {
echo $row['fname'];
echo $row['lname'];
echo $row['scoreTime'];
echo "<br />";
}
I am getting the list of names in the correct order i.e the first name on the list is the person who had the lowest score however the score displayed is not their lowest score
If I use the following
Code:
while ($row = mysql_fetch_array($mysql_result)) {
echo $row['fname'];
echo $row['lname'];
echo $row['f1'];
echo "<br />";
}
It does display the correct lowest score for this user. So I need to amend my query so that echo $row['scoreTime'] displays what $row['f1'] is displaying
Really would appreciate any help with this
Bookmarks