Re: MySQL Limit Question
| From: | Justin Patrin | Date: | Wed, 31 Mar 2004 19:23:46 +0000 |
| Subject: | Re: MySQL Limit Question | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-23329@lists.php.net to get a copy of this message | ||
Tony Devlin wrote:
How can I setup a query to select from a database ONLY the last 5 inserted rows. OR atleast the last 5 starting from this date back, but only select the last 5 in order. If anyone has any suggestions I'd appreciate them. Thanks, TonyI would set up a timestamp column in the table then select ordered by the timstamp descending and limit to 5. -- paperCrane <Justin Patrin>