Skip to content

Commit

Permalink
LimitClause: offset compatibility. Fixes FaaPz#47
Browse files Browse the repository at this point in the history
Use the de-facto standard LIMIT n OFFSET m syntax instead of MySQL-specific LIMIT n,m.
  • Loading branch information
kbaryshnikov committed Aug 18, 2016
1 parent 9424e6d commit adc3c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PDO/Clause/LimitClause.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function limit($number, $offset = null)
}

if ($offset >= 0) {
$this->limit = intval($offset).' , '.intval($number);
$this->limit = intval($number).' OFFSET '.intval($offset);
} elseif ($number >= 0) {
$this->limit = intval($number);
}
Expand Down

0 comments on commit adc3c23

Please sign in to comment.