Re: MySQL question
| From: | Rasmus Lerdorf | Date: | Thu, 06 Jul 2000 05:53:48 +0000 |
| Subject: | Re: MySQL question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5164@lists.php.net to get a copy of this message | ||
> How can I get the 20 most recent additions to a MySQL db? I am logging
> certain info about visitors to the database and want to be able to display
> a bit of info about the last 20 visitors. How can I do this? Should there
> be some sort of unique ID for every entry?
Timestamp each one and simply do:
select * from visitor order by ts DESC limit 20
-Rasmus