我想要做的是int(11)
从 mysql 获取日期和时间并在 PHP 中显示它:
<?php
$dbusername = 'dbuser';
$dbpassword = 'dbpassword';
$dbhost = 'localhost';
$dbname = 'dbname';
$conn = mysql_connect($dbhost,$dbusername,$dbpassword);
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
$conn = mysql_connect($dbhost,$dbusername,$dbpassword);
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db($dbname, $conn);
$query = "SELECT from_unixtime(mycolumn) FROM mytable";
?>
但页面加载并没有显示任何内容。
怎么了?