haisan Posted March 1, 2008 Share Posted March 1, 2008 I am trying to create an events calendar for the city I live in. At the moment am using a modified version of Gigpress. It is a simple events calendar, where you enter an event, and it is placed into an "upcoming" section, until the day of the event, when it is moved into a "past events" category. The trouble is, the database is updated at 12:01am each day, moving each day's events automatically from "upcoming" to "past events." But it would be a lot more useful for current events to stay in the "upcoming" category until the end of the day, or even a day or two later. So, I would like to modify the date check so that the database is not updated until a day or two after an event happens, instead of on the day. Any advice on how best to do this? Quote Link to comment Share on other sites More sharing options...
zq29 Posted March 1, 2008 Share Posted March 1, 2008 How is the database update being triggered, CRON? That is, in fact, if it is actually a database update - The code could just be pulling information from the database based on hardcoded criteria. Does Gigpress have a support forum? Might be worth giving them a shout... Quote Link to comment Share on other sites More sharing options...
haisan Posted March 2, 2008 Author Share Posted March 2, 2008 Thanks a lot for your replay. Sadly, Gigpress was just one guy's invention, and it does not seem to have enough adherents to warrant a forum. Anyhow, yes, there is a basic database query at the start of the template, which initiates the database update. My problem is, I have not been able to find way to change when the date triggers that database change. // Update each one's show_expire with its show_date if($getshows) { foreach($getshows as $show) { $setdates = $wpdb->query(" UPDATE ".$gigpress['gigs_table']." SET show_expire = '".$show->show_date."' WHERE show_id = ".$show->show_id." "); } }; I'm sure there is some (simple) way of setting the date so the database update is triggered two days after the real date, but I cannot find any explanation of how to do so. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.