mattia Posted January 23, 2012 Report 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
Jeff Posted January 23, 2012 Report Posted January 23, 2012 <?php $pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname?> or <th>'.$pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname.'</th> Quote
mattia Posted January 23, 2012 Author Report 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
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.