Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Check database value cron/php and change if true


Frank_Rizzo - 4:56 pm on Aug 21, 2010 (gmt 0)


Even easier would be a cron job running a mysql script:

#dailyupdate.sh
mysql --user=yourdatabaseuser --password=yourpassword <dailyupdate.sql

create dailyupdate.sql from rocknbill's example above.

#dailyupdate.sql
update table set type=1 where approved=1 and featured_date_end <= curdate();

Now set up a cron job to run dailyupdate.sh just before / after midnight or so.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4190188.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com