Moderators mark1million Posted February 23, 2010 Moderators Report Posted February 23, 2010 Nabeel, I have on the pilots page a last flight, if we have a new joiner with no flight this defaults to 01.Jan.1970 Example, http://www.easyjetva.com/index.php/pilots, if there any way to mod this out to display N/A or none as apposed to the date if no flight has been flown yet? Quote
Administrators Nabeel Posted February 23, 2010 Administrators Report Posted February 23, 2010 Just do something like if(date == 0) { echo 'No flight'; } date replaced with the right variable, it might be $pilot->lastpirep Quote
Moderators mark1million Posted February 23, 2010 Author Moderators Report Posted February 23, 2010 OK so i was about to post for help but some coffee and logical thinking i have this working, it might not be the right way but its working lol:) <?php if($pilot->lastpirep == 0) { echo 'No flight'; } else { $report = PIREPData::GetLastReports($pilot->pilotid, 1); echo date('d.M.Y', strtotime($report->submitdate)); } ?> 1 Quote
Administrators Nabeel Posted February 23, 2010 Administrators Report Posted February 23, 2010 That's the right way Quote
Moderators joeri Posted July 12, 2011 Moderators Report Posted July 12, 2011 OK so i was about to post for help but some coffee and logical thinking i have this working, it might not be the right way but its working lol:) <?php if($pilot->lastpirep == 0) { echo 'No flight'; } else { $report = PIREPData::GetLastReports($pilot->pilotid, 1); echo date('d.M.Y', strtotime($report->submitdate)); } ?> good job Mark i give you a small pad on the back Quote
Blu-Express VA Posted July 13, 2011 Report Posted July 13, 2011 Hi, Which is the file and where it's put??? Thanks! 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.