Jump to content

Schedule List


CPC900

Recommended Posts

I just want to create a separate schedule module, that lists my whole schedule, from the database. I just want to create a table from the database with specific columns. I am having a heck of a time getting this to work.

On my original site before phpvms, it was just a table with the data filled in from the sql database. It was simple but I would like to have it as an additional item in addition to the schedule bid search.

It would be like posting the full schedule .csv file, but in a table on the site.

Link to comment
Share on other sites

  • Moderators

<?php
$scheds = SchedulesData::getSchedules();
?>
<table width ="100%">
<tr>
<th align="center">Flight #</td>
<th align="center">Departure</td>
<th align="center">Arrival</td>
<th align="center">Time Out</td>
<th align="center">Time In</td>
<th align="center">Fare Price</td>
<th align="center">Aircraft</td>
</tr>
<?php
foreach($scheds as $sched)
{
?>
<tr>
<td align="center"><?php echo $sched->code.$sched->flightnum ;?></td>
<td align="center"><?php echo $sched->depicao ;?></td>
<td align="center"><?php echo $sched->arricao ;?></td>
<td align="center"><?php echo $sched->deptime ;?></td>
<td align="center"><?php echo $sched->arrtime ;?></td>
<td align="center"><?php echo $sched->price ;?></td>
<td align="center"><?php echo $sched->aircraft ;?></td>
</tr>
<?php
}
?>

Screenshot:

SD.png

  • Like 1
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...