Re: mysql databases
| From: | Niel Archer | Date: | Sat, 14 Oct 2006 18:18:34 +0000 |
| Subject: | Re: mysql databases | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42549@lists.php.net to get a copy of this message | ||
Hi Bob
First you would need a means of identifying your oldest entry, some kind
of Date-Time field would seem simplest. Then, one way, would be to
SELECT the oldest value and use it in the 'where' clause of an UPDATE.
SELECT MIN(stamp) FROM table;
will get the oldest date-time value
and
UPDATE table SET stamp = '$NewStamp', col2 = $col2 WHERE stamp = '$Oldest;;
would update the entry.
Apologies for the sparse code snippets, but I'm in a hurry and don't
have time to write the full PHP for the queries.
Niel