Jump to content

Recommended Posts

Posted

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. ;-)

  • 2 weeks later...
  • Administrators
Posted

People have times when the system get the touch down and have some flight when he doesn't get the touch down someone can help me please ?

If it producing any errors? what version phpVMS?

  • 1 month later...
  • Moderators
Posted

The data is there it just needs coding to insert in in to the db, even manual entries work if you put a figure in to that table in the db, but my limited knowledge of coding its way above my head :)

  • Moderators
Posted

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 :)

  • Administrators
Posted

It should be populating in the landingrate column. I think this addon needs to be updated.

Just change instances of 'landing_stat' to 'landingrate'

  • 2 weeks later...
Posted

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?

  • Administrators
Posted

Just tried it on my test site and seems to work. Try putting a print_r($row); after the first bracket in the foreach and see if there is any value set for the [aircraft] section.

Posted

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 ) 

  • Administrators
Posted

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.

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...