How can I retrieve the last 10 rows inserted into a table?
how can i retrieve through user id
Hari kanna
2010-07-06 05:22:04
I guess you want something like select * from tableName where user_id=10 ORDER BY `created_at` DESC LIMIT 10
Salil
2010-07-06 05:33:12
+1
A:
MySQL :: MySQL 3.23, 4.0, 4.1 Reference Manual :: 11.13 ...
http://dev.mysql.com/doc/refman/4.1/en/information-functions.html
ratty
2010-07-06 05:20:36
+1
A:
Hi you can use the below query, please ensure about the primary-key
field
select * from tbl ORDER BY 'ID' DESC LIMIT 10
VAC-Prabhu
2010-07-06 05:29:53