Print a schedule from first date to last date |
7/27/2011 16:14:04 | |
| PHPRunner General questions | ||
|
P
pim author
Hi there, |
||
|
C
|
cgphp 7/27/2011 |
|
I would like to print this view based on a sorting of 'StartDates', (logically) starting with the first date and ending with the last date. How can I do that?
$strOrderBy = "ORDER BY StartDate DESC";Another related question I have is; the table 'f_tour_schedule' has three other fields: 'EndDate', 'NrOfDays' and 'NrOfNights'. Which code I would have to add so that 'NrOfDays' and 'NrOfNights' automatically get calculated? They are originating from the table 'f_tours'.
$value = round((strtotime($data['EndDate']) - strtotime($data['StartDate'])) / 86400); //this code is valid for a custom field |
|