Skip to content


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

robocoder opened this Issue · 2 comments

1 participant


This looks wrong:

// increase limit by offset when visitor paginates
    $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;

Or use:

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

which is compatible with PostgreSQL syntax.


(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.