date() is showing December 1969

Posted by Doug on Stack Overflow See other posts from Stack Overflow or by Doug
Published on 2010-04-26T01:28:46Z Indexed on 2010/04/26 1:33 UTC
Read the original article Hit count: 337

Filed under:
|
$sql = "SELECT * FROM news ORDER BY `news_id` DESC LIMIT 1";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$date = $row['time_posted'];
echo "<i> " .date("Y/m/d", $date) . "</i>: ";

I used timestamp in mysql. So, what's the problem?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php5