abs0lut Posted May 28, 2008 Share Posted May 28, 2008 I need to update a column when the date now is greater than the expiry date. do I need to use cron? any help would be appreciated. Link to comment https://forums.phpfreaks.com/topic/107590-update-when-the-date-now-is-greater-than/ Share on other sites More sharing options...
rhodesa Posted May 28, 2008 Share Posted May 28, 2008 Can you describe a little more in detail what you are trying to accomplish. Cron would probably work, but there is probably a better solution. What is the "update" you are making? Link to comment https://forums.phpfreaks.com/topic/107590-update-when-the-date-now-is-greater-than/#findComment-551585 Share on other sites More sharing options...
abs0lut Posted May 29, 2008 Author Share Posted May 29, 2008 the computer will update a column (status) into expired if the date today is greater than the expiry date. expiry date is a column.. whats the other better solution? Link to comment https://forums.phpfreaks.com/topic/107590-update-when-the-date-now-is-greater-than/#findComment-552333 Share on other sites More sharing options...
rhodesa Posted May 29, 2008 Share Posted May 29, 2008 Well, if it's a simple comparison like that, there is no need to have an extra column (in my opinion). If you want only active records, just add a now() < expiry_date to the WHERE clause of your query. Link to comment https://forums.phpfreaks.com/topic/107590-update-when-the-date-now-is-greater-than/#findComment-552475 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.