尝试在表格中显示不同的数据,但我只是获取最新的结果。我在代码中唯一改变的是添加> CURDATE而不是最简单的*。它已停止显示所有结果。你能帮忙吗?
$result = mysqli_query($con,"SELECT * FROM tripdata WHERE date > CURDATE()");
while($row = mysqli_fetch_assoc($result))
{
echo "<table class='mainpics'>";
echo "<tr><td><a class='mainpic' href='". $row['pageurl'] ."'><img class='mainpic' src='" . $row['mainpic'] . "'/></a></td></tr>";
echo "</table>";
}
mysqli_close($con);
?>