Closed kbaryshnikov closed 7 years ago
The problem in statementContainer.php
public function limit($number, $offset = null) { $this->limitClause->limit($number, $offset);
return $this;
}
Change to
public function limit($number, $offset = 0) { $this->limitClause->limit($number, $offset);
return $this;
}
@alaa92 How is this related to postgresql compatibility?
Thanks guys! I've merged @delef's PR (#62) already, which includes this fix. 😄
Use the de-facto standard LIMIT n OFFSET m syntax instead of MySQL-specific LIMIT n,m.
It won't solve the incorrect SQL issue when calling ->limit($num, $offset)->offset($offset), but this problem existed anyway. and doesn't seem to be solvable without reworking LimitClause and OffsetClause into a single LimitOffsetClause.