for ($i=$start_time; $i<=$current_time; $i+=86400) {
$end_time = $i+86400;
$result = M()->query("SELECT
@ -115,9 +122,16 @@ class ConsoleController extends Think {
user_id,
promote_id
FROM
tab_user_login_record
tab_user_login_record ulr
WHERE
login_time >= {$i} and login_time < {$end_time}
AND NOT EXISTS (
SELECT
id
FROM
tab_login_daily_record ldr
where ldr.create_time >= {$i} and ldr.create_time < {$end_time} and ldr.game_id = ulr.game_id and ldr.user_id = ulr.user_id and ldr.promote_id = ulr.promote_id
)
GROUP BY
create_time,
game_id,
@ -131,6 +145,7 @@ class ConsoleController extends Think {