2010-07-06 62 views

回答

3
select * from tableName ORDER BY `created_at` DESC LIMIT 10 
+0

我如何通过用户ID – 2010-07-06 05:22:04

+0

找回我猜你想要的东西像 SELECT * FROM表名其中USER_ID = 10 ORDER BY'created_at' DESC LIMIT 10 – Salil 2010-07-06 05:33:12

2

嗨,你可以使用下面的查询,请确保对primary-key

select * from tbl ORDER BY 'ID' DESC LIMIT 10 
-1

有用于MySql两种解决方案:

  1. 检查你的表和使用的行数限制

    select count(*) from tableName; 
    select * from tableName limit rowcount-10,rowcount; 
    
  2. PhpMyAdmin使用分页显示结果。您可以转到最后一页查看上次插入的记录。

相关问题