如何从 mysql 数据库中仅显示小时和分钟的 Php,例如(00:00)?这是我的代码:
$query = "SELECT * FROM table";
$resualt = mysqli_query($conn, $query);
if (mysqli_num_rows($resualt) > 0)
{
echo "<table class='tb'>";
while($row = mysqli_fetch_assoc($resualt)){
echo "<tr><td>" . $row['id']. "</td><td> " .$row['name']. " </td><td> " . $row['place']. " </td><td> " . $row['ddate']. " </td><td> " . $row['dtime']. " </td><td> ".$row['message']."</td></tr>";
}
echo `enter code here`"<table>";
}
else
{
echo "there is no record.";
}
谢谢