我真的很想找人帮忙,而Read from bottom to top in PHP & SQL对我不是很有帮助;我不做MySQL。从上次到下次排序结果?
我基本上试图做的是从底部到顶部读取数据库表。与目前从上到下阅读的事实不同,我希望从底部开始。是否有PHP函数或代码开始从底部读取?
这里是读取数据库的代码:
<?php
//Here is the connecting to database stuff; works fine and not going to share it
$result = mysqli_query($con,"SELECT * FROM posts");
//This has PHP select and read the table (at least I think it does; I'm not the best coder in the world)
while($row = mysqli_fetch_array($result))
{
echo "<h4>";
echo $row['username'];
echo "</h4><p>";
echo $row['message'];
echo "</p>";
}
//All this stuff just reads and echos the data
mysqli_close($con);
//Closes database connection
?>
哪些列/类型,你对职位表?发布你的结构。 – Prix
您是否在询问有关退回记录的订单? – vee
为什么不能在查询中使用ORDER BY?它简单得多。我也不建议'SELECT * ...''*'对于字段名称来说太混乱以至于不能保持 – bansi