Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Live API: loadLastVisitorDetailsFromDatabase - $offset + $limit ? #1850

Closed
robocoder opened this Issue · 2 comments

1 participant

@robocoder
Collaborator

This looks wrong:

// increase limit by offset when visitor paginates
if(!empty($offset))
{
    $limit += (int)$offset;
}
...
    LIMIT ".(int)$limit;

Since it doesn't look like the $offset is set in the current code, this probably won't be a compat buster: remove the += statement, and change the LIMIT clause to:

    LIMIT ".(int)$offset.",".(int)$limit;
@robocoder
Collaborator

Or use:

    LIMIT ".(int)$limit." OFFSET ".(int)$offset;

which is compatible with PostgreSQL syntax.

@robocoder
Collaborator

(In [3389]) fixes #1850

@robocoder robocoder added this to the Piwik 1.1 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.