In message <[EMAIL PROTECTED]>, Marian Briones <[EMAIL PROTECTED]> writes >Now the next thing, I am writing a script that will run as a cron job >to delete records from a table that are more than 14 days old. The >entry date is just the good old date field in this format 2005-06-27 >that goes in when the record is made using NOW(). > >How can I make my script do a date calculation? I could either put an >exp date in the data table when the record goes in,but how do I say >that the exp date is NOW() + 14 (days?) NOt sure about calculations >with date and time.
SET expdate = DATE_ADD(NOW(), INTERVAL 14 DAY) But have you got the cron job working? I am having lots of problems setting up a cron on a dedicated server, and would really appreciate some help -- Pete Clark http://www.hotcosta.com http://www.spanishholidaybookings.com Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
