23 lines
595 B
PHP
23 lines
595 B
PHP
<?php
|
|
require_once '_flashii.php';
|
|
|
|
$startId = (int)filter_input(INPUT_GET, 'start', FILTER_SANITIZE_NUMBER_INT);
|
|
|
|
try {
|
|
$fetch = $db->prepare('
|
|
SELECT `user_id`, `username`
|
|
FROM `msz_users`
|
|
WHERE `user_id` > :user_id
|
|
AND `user_created` > NOW() - INTERVAL 2 DAY
|
|
ORDER BY `user_id`
|
|
LIMIT 10
|
|
');
|
|
$fetch->bindValue('user_id', $startId);
|
|
if($fetch->execute())
|
|
echo json_encode($fetch->fetchAll(PDO::FETCH_ASSOC));
|
|
else
|
|
echo '[]';
|
|
} catch(PDOException $ex) {
|
|
http_response_code(500);
|
|
echo '{"error":104}';
|
|
}
|