where('last_active',$week_start,'>=')->where('last_active',$week_end,'<=')->getValue(T_USERS,'COUNT(*)'); $month_end = time() - (60 * 60 * 24 * 30); $month_start = time() - (60 * 60 * 24 * 60); $month_users = $db->where('last_active',$month_start,'>=')->where('last_active',$month_end,'<=')->getValue(T_USERS,'COUNT(*)'); $month_end3 = time() - (60 * 60 * 24 * 61); $month_start3 = time() - (60 * 60 * 24 * 150); $month_users3 = $db->where('last_active',$month_start3,'>=')->where('last_active',$month_end3,'<=')->getValue(T_USERS,'COUNT(*)'); $month_end6 = time() - (60 * 60 * 24 * 151); $month_start6 = time() - (60 * 60 * 24 * 210); $month_users6 = $db->where('last_active',$month_start6,'>=')->where('last_active',$month_end6,'<=')->getValue(T_USERS,'COUNT(*)'); $month_end9 = time() - (60 * 60 * 24 * 211); $month_start9 = time() - (60 * 60 * 24 * 300); $month_users9 = $db->where('last_active',$month_start9,'>=')->where('last_active',$month_end9,'<=')->getValue(T_USERS,'COUNT(*)'); $year_end = time() - (60 * 60 * 24 * 365); $year_users = $db->where('last_active',$year_end,'<=')->getValue(T_USERS,'COUNT(*)'); ?>