CrashGordon Posted September 1, 2009 Report Posted September 1, 2009 One of our pilots just asked an interesting question. Where can he find the type of flight? In other words where is the information that it is either a passenger, cargo or charter flight. I looked, but couldn't find it except in admin where I edit the routes. Quote
Administrators Nabeel Posted September 1, 2009 Administrators Report Posted September 1, 2009 You have to put it into the schedule results or the schedule page itself. I think it will be $schedule->type (if $schedule is the variable used) Quote
CrashGordon Posted September 2, 2009 Author Report Posted September 2, 2009 It should be obvious from this that I don't know PHP, but the following code <h3>Schedule Details</h3> <div class="indent"> <strong>Flight Number: </strong> <?php echo $schedule->code.$schedule->flightnum ?><br /> <strong>Departure: </strong><?php echo $schedule->depname ?> (<?php echo $schedule->depicao ?>) at <?php echo $schedule->deptime ?><br /> <strong>Arrival: </strong><?php echo $schedule->arrname ?> (<?php echo $schedule->arricao ?>) at <?php echo $schedule->arrtime ?><br /> <strong>Type: </strong><?php echo $schedule->type ?><br /> <?php produces this display. Schedule DetailsFlight Number: ABV888Departure: Sydney International Airport (YSSY) at 0700 Arrival: Townsville Amo (YBTL) at 1000 Type: Note there is no type data displayed. Sorry to be so dumb. :'( Quote
Administrators Nabeel Posted September 2, 2009 Administrators Report Posted September 2, 2009 Sorry!! It's because I lied. It's actually $schedule->flighttype The name (flighttype) always will match the column in the database. The only exception are airports (there's depicao/depname and arricao/arrname) Quote
CrashGordon Posted September 2, 2009 Author Report Posted September 2, 2009 Thanks. I feel better now. ;D That worked. I'm assuming I can use a similar approach to display routes by flighttype. Quote
Administrators Nabeel Posted September 3, 2009 Administrators Report Posted September 3, 2009 Yessir. If you do print_r($schedule); Or whatever the variable is, you'll be able to see all the fields which are available 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.