I am using Chris' Best Band Site for our schedule page. See it here
Problem is that shows are auto deleting on the morning of the event. I need it to delete a couple of days later, or at least at the end of the day so that attendees can look up the location all day.
//end row $table.= '<div class="clear"></div>'; $table.= '</div>'; } } else { //output general message $table = '<p>Sorry! There is no show information available at this time. Check back soon!</p>'; }
Hmm...that SQL statement looks right, did you change it to that or was it set to that already?
$query = 'SELECT show_id, date_starts, stime, venue, url, city, state, DATE_FORMAT(date_starts,\'%b %e\') as ds FROM shows WHERE date_starts >= NOW() ORDER BY date_starts ASC';
This is the important bit, basically says pick anything where date is either today or in the future
I didn't change it. Shows are still being deleted at the beginning of the day. Can I change that code somehow to tell it to delete a few days after the event?
Problem is that shows are auto deleting on the morning of the event. I need it to delete a couple of days later, or at least at the end of the day so that attendees can look up the location all day.
I'm guessing there will be a statement that says something like "SELECT * FROM Events WHERE EventDate > NOW()". JUst change the ">" to ">=".
Thanks TT_Mark. Here it is.
This is the important bit, basically says pick anything where date is either today or in the future
This was modified from: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_adddate
It might work :-p.