Hi,
does anyone know how to display the Date Joined , and Last Landed location of someone on their profile?
Hi,
does anyone know how to display the Date Joined , and Last Landed location of someone on their profile?
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>
Thank you very much.
Is there a complete db call sheet, other than this one http://pastebin.com/ERuvPcmV
Not that I know of!!
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)
Try this:
<?php echo date("Y-m-d", $pilot->joindate);?>
Thank you sir
Still gives me 1969-12-31
Try this:
$tme = strtotime($pilot->joindate);
$time = date("Y-m-d", $tme);
echo $time;
Alright, thanks again. I will give it a go