mattia Posted January 23, 2012 Report Share Posted January 23, 2012 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 Quote Link to comment Share on other sites More sharing options...
Jeff Posted January 23, 2012 Report Share Posted January 23, 2012 <?php $pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname?> or <th>'.$pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname.'</th> Quote Link to comment Share on other sites More sharing options...
mattia Posted January 23, 2012 Author Report Share Posted January 23, 2012 <?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 Quote Link to comment Share on other sites More sharing options...
mattia Posted January 23, 2012 Author Report Share Posted January 23, 2012 add image Quote Link to comment Share on other sites More sharing options...
mattia Posted January 24, 2012 Author Report Share Posted January 24, 2012 any idea Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.