I am trying a very simple plugin to display some results on a member's profile page. Look at the following code:
Code:
$pilotid = $userinfo['userid'];
$pilotid = "VAA".$pilotid;
$getlatestpireps = $db->query_read("SELECT * FROM pirep WHERE pilot_id = '$pilotid' ORDER BY date DESC LIMIT 10");
while ($row = $db->fetch_array($getlatestpireps)) {
$latest_pireps = $row['date'];
}
It will only display 1 result (the LAST result), instead of 10. What is wrong with it? Thanks for any help.