Re: newest entry in db
| From: | Justin French | Date: | Sun, 01 Sep 2002 07:59:04 +0000 |
| Subject: | Re: newest entry in db | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114815@lists.php.net to get a copy of this message | ||
SELECT * FROM mytable ORDER BY timestampcolumn DESC LIMIT 1
or
SELECT * FROM mytable ORDER BY id DESC LIMIT 1
HTH
Justin French
on 01/09/02 2:25 AM, Victor (victor@argilent.com) wrote:
> How can I use php to get the newest entry from mysql database? Ie, if I
> make a timestamp and then I want to retrieve the last timestamp I made
> how do I go about doing it? Any php or mysql documentation?
>
> - Victor > www.argilent.com
>
>
> ______________________________________________________________________
> Post your ad for free now! http://personals.yahoo.ca