= 50 AND dateadd <= '" . date("Y-m-t", strtotime("last month")) . "' ORDER BY actual_rating DESC LIMIT " . (date("d") - 1) . ",1")); } else { $days = $_GET["d"]; if (is_numeric($days) == false) exit; /* "today's" game */ $new_date = strtotime("-$days day", time()); list($game_name, $game_file, $game_width, $game_height) = mysql_fetch_array(mysql_query("SELECT name, CONCAT(gameurlname, '.', gametype), width, height FROM 85play_games WHERE total_votes >= 50 AND dateadd <= '" . date("Y-m-t", strtotime("last month", $new_date)) . "' ORDER BY actual_rating DESC LIMIT " . (date("d", $new_date) - 1) . ",1")); } } else { if (is_numeric($_GET["id"]) == false) exit; $game_id = $_GET["id"]; list($game_name, $game_file, $game_width, $game_height) = mysql_fetch_array(mysql_query("SELECT name, CONCAT(gameurlname, '.', gametype), width, height FROM 85play_games WHERE idgame=$game_id")); } /* "yesterday's" game */ $yesterday_date = strtotime("-" . ($days + 1) . " day", time()); list($yesterday_game_name) = mysql_fetch_array(mysql_query("SELECT name FROM 85play_games WHERE total_votes >= 50 AND dateadd <= '" . date("Y-m-t", strtotime("last month", $yesterday_date)) . "' ORDER BY actual_rating DESC LIMIT " . (date("d", $yesterday_date) - 1) . ",1")); ?> Play

Yesterday: