Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBCommandClass LIMIT and OFFSET clause issue #2236

istvanpatai opened this issue Oct 29, 2017 · 0 comments


Copy link

commented Oct 29, 2017

There is an issue in the DBCommandClass.php between lines 1578-1582 in the sql SELECT query contructor function. The LIMIT clause arguments (limit and offset numeric values) are used in a wrong order in some cases.
According to SQL documentation the LIMIT clause syntax can be defined in two ways:

Longer syntax

$sql = "SELECT * FROM Orders LIMIT 10 OFFSET 15";

Shorter syntax

$sql = "SELECT * FROM Orders LIMIT 15, 10";

When defining just the LIMIT argument, it's fine. But when there is also an OFFSET argument defined, basically the LIMIT and OFFSET arguments have to be swapped between each other.

Unfortunately this function is so basic and essential for the complete project that is questionable that does is worth fix it or we just can live with that? :)

Please let me know if I'm wrong or I just missed something.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.