schema updated and stat-day.php fixed