Re: Selecting last record only
| From: | -{ Rene Brehmer }- | Date: | Wed, 21 Jan 2004 21:36:53 +0000 |
| Subject: | Re: Selecting last record only | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32568@lists.php.net to get a copy of this message | ||
thx a bunch :) ... figured it would be something simple ... :p
Rene
Fate would have it, that on Wed, 21 Jan 2004 11:55:23 -0800, Micah Stevens
wrote:
>Reverse the order and limit the result to 1.
>
>For example, change:
>SELECT date, item from some_table
>
>To:
>
>Select date, item from some_table ORDER BY date DESC LIMIT 1
>
>to get the latest dated item.
>
>-Micah
Rene Brehmer
aka Metalbunny
http://metalbunny.net/
References, tools, and other useful stuff...