I am having database of some fixtures of sports. Currently by add below, it shows future fixtures but I want to add function of Results of Matches. So I just want to show past fixtures. The below is code added to show only future fixtures and neglect anything past. $currentdate = date("Y-m-d"); Code (markup): What should I change to show past fixtures.
I'm not 100% sure of your question is $currentdate = date("Y-m-d"); being passed to show the fixtures? if so then you have to add a timestamp that indicates past data such as //Make a timestamp $previous_time = mktime(1, 0, 0, 9, 24, 2009); // change 1, 0, 0, 9, 24, 2009 - h, i, s, m, d, y //Changing your current date $currentdate = date("Y-m-d", $previous_time); PHP:
does the line work though because I'm not sure how its querying and taking a guess here.... $days_to_query = 60; $days_to_ts = (3600 * 24) * $days_to_query; $previous_time = strtotime("now") - $days_to_ts; $currentdate = date("Y-m-d", $previous_time); PHP: your query has to be something like date>=$currentdate
date >= $pastdate AND date <= $currentdate where $pastdate = time for past (for 60 days its like time() - 60 * 24 * 60 * 60) $currentdate = time()