Announcement

Collapse
No announcement yet.

What is wrong with this code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • What is wrong with this code?

    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, instead of 10. What is wrong with it? Thanks for any help.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X