Fixing offset.
This commit is contained in:
parent
1d6efa2c7b
commit
c44d800333
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user