现在我想按日期对结果进行排序。最早的日期。标题,位置和日期适用于计划活动,并填入表格以创建新活动。
这是我的代码:
$select_record = mysqli_query($connection, "select * FROM records");
while($row=mysqli_fetch_array($select_record)){
$title = $row['title'];
$location = $row['location'];
$date = $row['date'];
echo "<h3>$title<br></h3>";
echo "<p>$location<br></p>";
echo "<p>$date<br></p>";
}
答案 0 :(得分:3)
答案 1 :(得分:0)
您可以对查询进行更改,以实现您想要的目标
SELECT * FROM records ORDER BY date ASC;