On Tue, 29 May 2001, Signe Hasseriis wrote:
> Please tell me how to select the 10 (or 5) newest records or posts from a MySql
>table.
>
> Best Wishes
>
> Signe Hasseriis
>
IMHO, there's no fair way.
May be this trick works. add a field with type timestamp to your table,
for example
'modified'. then select your table like this query :
select * from tbl_foo order by modified desc limit 5;
the field 'modified' will be updated every update/insert query.
CMIIW
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php