Kishshey Posted October 20, 2015 Report Posted October 20, 2015 Hi, does anyone know how to display the Date Joined, and Last Landed location of someone on their profile? Quote
Moderators Parkho Posted October 20, 2015 Moderators Report Posted October 20, 2015 For date joined, inside the foreach loop add a table row like this: <tr><td>Date Joined:</td></tr> . . . . <tr><td><?php echo $pilot->joindate ;?></td></tr> For the last arrival location inside foreach loop: <?php $pid = $pilot->pilotid; $sql = "SELECT * FROM phpvms_pireps WHERE pilotid = '$pid' ORDER BY submitdate DESC"; $pirep = DB::get_row($sql); ?> <tr><td>Last Location:</td></tr> . . . . <tr><td><?php echo $pirep->arricao ;?></td></tr> Quote
Kishshey Posted October 20, 2015 Author Report Posted October 20, 2015 Thank you very much. Is there a complete db call sheet, other than this one http://pastebin.com/ERuvPcmV Quote
Moderators Parkho Posted October 21, 2015 Moderators Report Posted October 21, 2015 Not that I know of!! Quote
Kishshey Posted October 28, 2015 Author Report Posted October 28, 2015 Alright, great. Btw when I use that to call the Join date, it also shows the time. and if I change the code to <?php echo date(DATE_FORMAT, $pilot->joindate) ;?> It shows me 31/12/1969. (I'm sorry I am not good with php) Quote
Moderators Parkho Posted October 28, 2015 Moderators Report Posted October 28, 2015 Try this: <?php echo date("Y-m-d", $pilot->joindate);?> Quote
Kishshey Posted October 29, 2015 Author Report Posted October 29, 2015 Still gives me 1969-12-31 Quote
Moderators Parkho Posted October 29, 2015 Moderators Report Posted October 29, 2015 Try this: $tme = strtotime($pilot->joindate); $time = date("Y-m-d", $tme); echo $time; Quote
Kishshey Posted October 29, 2015 Author Report Posted October 29, 2015 Alright, thanks again. I will give it a go 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.