Fixing offset.

This commit is contained in:
sergiotarxz 2023-08-08 20:05:42 +02:00
parent 1d6efa2c7b
commit c44d800333
1 changed files with 2 additions and 2 deletions

View File

@ -50,12 +50,12 @@ sub _populate_locations ($dbh) {
my $tracking = BurguillosInfo::Tracking->new( BurguillosInfo->new ); my $tracking = BurguillosInfo::Tracking->new( BurguillosInfo->new );
my $page = 0; my $page = 0;
while (1) { while (1) {
my $data = $dbh->selectall_arrayref( <<'EOF', { Slice => {} }, $page ); my $data = $dbh->selectall_arrayref( <<"EOF", { Slice => {} }, $page );
SELECT uuid, remote_address SELECT uuid, remote_address
FROM requests FROM requests
WHERE date > NOW() - interval '2 months' WHERE date > NOW() - interval '2 months'
LIMIT 100 LIMIT 100
OFSSET ?; OFSSET $page;
EOF EOF
if (!@$data) { if (!@$data) {
return; return;