Jump to content

PILOT ID QUESTION


mattia

Recommended Posts

hi all,

I created this code to see the longest flight


<h4>TEST</h4>
<table width="100%" border="1" align="center">
<tr bgcolor=blue>
<th><b><font color=black>pilot</th></b>
<th><b><font color=black>flight</th><b/b>
<th><b><font color=black>time</th></b>
<th><b><font color=black>cliente</th></b>
</tr>

<?php
$query="SELECT * FROM phpvms_11pireps
WHERE flighttime_stamp > '00:00:00'
ORDER BY flighttime_stamp DESC LIMIT 15";
$list=DB::get_results($query);
foreach ($list as $pirep)
{

echo '<tr><th>'.$pirep->pilotid.'</th>
<th>'.$pirep->flightnum.'</th>
<th>'.$pirep->flighttime_stamp 	.'</th>
<th>'.$pirep->source.'</th>
</tr>';

}
echo '</table>'
?>

works, but how can I take from the pilot ID his name and surname of the pilot??

thanks in advance to all :)

Link to comment
Share on other sites

<?php $pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname?>

or

<th>'.$pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname.'</th>

hi jeff

thanks for help but dont work i try

<?php
$query="SELECT * FROM phpvms_11pireps
WHERE flighttime_stamp > '00:00:00'
ORDER BY flighttime_stamp 	 DESC LIMIT 15";
$list=DB::get_results($query);
foreach ($list as $pirep)
{
	echo '<tr><th>

'.$pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname.'

</th>
<th>'.$pirep->flightnum.'</th>
<th>'.$pirep->flighttime_stamp 	.'</th>
<th>'.$pirep->source.'</th>
</tr>';

}
echo '</table>'
?>

appears only pilot id

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