mirror of
https://github.com/sigmasternchen/mobmash.click
synced 2025-03-15 08:09:02 +00:00
24 lines
520 B
PHP
24 lines
520 B
PHP
![]() |
<?php
|
||
|
|
||
|
function updateCache(): void {
|
||
|
global $pdo;
|
||
|
|
||
|
$query = $pdo->query(<<<EOF
|
||
|
INSERT INTO mm_history_cache
|
||
|
SELECT
|
||
|
ratings,
|
||
|
last_update
|
||
|
FROM mm_rating_history
|
||
|
WHERE last_update > (
|
||
|
SELECT max(last_update)
|
||
|
FROM (
|
||
|
SELECT last_update
|
||
|
FROM mm_history_cache
|
||
|
UNION ALL
|
||
|
SELECT 0
|
||
|
) AS with_default
|
||
|
)
|
||
|
EOF
|
||
|
);
|
||
|
$query->execute();
|
||
|
}
|