Echo Timestamp字段到MDY

时间:2016-12-16 09:17:34

标签: datetime

我不是编码员,我确信有一个简单的答案,但我似乎无法找到我正在寻找的确切内容。在下面,我想要做的就是更新"更新" field(数据库中的00:00:00)时间戳字段仅显示页面上的月/日/年。我该怎么做?

    <?php
    $result = mysql_query ("SELECT amwx_16_public.member,amwx_16_public.location,amwx_16_public.state,SUM(amwx_events.amount) AS total,amwx_events.updated
    FROM amwx_16_public,amwx_events
    WHERE amwx_16_public.member_id=amwx_events.user_id
    Group By amwx_16_public.member,amwx_events.user_id
    ORDER BY total DESC")
    or die(mysql_error());  
    echo "<table border='5'>";
    echo "<tr><th>Member</th><th>Location</th><th>State</th><th>Total</th><th>Updated</th></tr>";
    while($row = mysql_fetch_array( $result )) {
    echo "<tr><td>"; 
    echo $row['member'];
    echo "</td><td>";
    echo $row['location'];
    echo "</td><td>"; 
    echo $row['state'];
    echo "</td><td>";
    echo $row['total'];
    echo "</td><td>";
    echo $row['updated'];
    echo "</td></tr>";
    }
    echo "</table>";
    ?>

0 个答案:

没有答案