Jump to content

Landingstats beta (DEPRECATED)


simpilot

Recommended Posts

I have the new beta. Is the code supplied on the first page here still needed to call up the info on ones site? Or is it default now. Just curious as I am not seeing it anywhere other than where I added it allready.

Now just to get it to update on recalcs and all will be good to go. ;-)

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • Moderators

I see whats its doing this add on is taking the data from a new row named landing_stat as you said you already have this information for all pireps in the landingrate row, so i suppose its just a case of pulling that data from that row instead of the newly created one.

Im not to cleaver with code but ill try and have a bash with this one :)

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I installed this and have it working but for some reason the aircraft column is blank.

I have this code in my lstats.tpl

<center>
<table>
<tr>
   <td>Pilot</td>
   <td>Arrival Field</td>
   <td>Aircraft</td>
   <td>Touchdown Rate</td>
</tr>
<?php
foreach ($lstats as $row)
   {
      echo '<tr><td><b>';
      $pilot = PilotData::GetPilotData($row->pilotid);
      echo $pilot->firstname.' '.$pilot->lastname;
      echo '</b></td>';
      echo '<td><b>';
      echo $row->arricao;
      echo '</b></td><td>';
      echo '<b>';
      $aircraft2 = OperationsData::GetAircraftInfo($row->aircraft);
      echo $aircraft2->name;
      echo '</b></td><td>';
      echo '<b>';
      echo $row->landing_stat;
      echo ' ft/min';
      echo '</b></td></tr>';
   }
?>
</table>
</center>

  Any ideas on how to fix this?

Link to comment
Share on other sites

This is the output I got. I don't see anything for aircraft.

stdClass Object ( [pirepid] => 15 [pilotid] => 1 [code] => PVA [arricao] => KPHL [landingrate] => -112.61 ) stdClass Object ( [pirepid] => 13 [pilotid] => 1 [code] => PVA [arricao] => KPHL [landingrate] => -121 ) stdClass Object ( [pirepid] => 14 [pilotid] => 4 [code] => PVA [arricao] => KIND [landingrate] => -143 ) stdClass Object ( [pirepid] => 17 [pilotid] => 4 [code] => PVA [arricao] => KPHL [landingrate] => -383.85 ) 

Link to comment
Share on other sites

  • Administrators

Looks like you are using the original LandingStatsData.php file. Open it up and find line 8

$query = "SELECT pirepid, pilotid, code, arricao, landing_stat

and change it to

$query = "SELECT *

That will bring all the fields back and the aircraft variable should be there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...