RE: datetime

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

 



> hello and thank you... probably again.
> using datetime, &/or something else if applicable, is it possible to
> have entries to a page and entries to a db automatically delete? i
> have looked through many docs at php.net and mysql and can't find
> anything. perhaps i'm using the wrong search key words.? thanks
> again, Addison

Well, no, not automatically. But you can run a query to delete records
that are over X days old.

DELETE FROM table WHERE datetime_field < CURDATE() - INTERVAL 30 DAYS

Will delete anything over 30 days old. Adapt to your needs.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
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