Re: mysql databases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux