FaaPz / PDO

Just another PDO database library
MIT License
316 stars 103 forks source link

Use the sql generic 'Limit Offset' syntax, not MySQL only one #142

Closed John71-Off closed 3 years ago

John71-Off commented 3 years ago

Using LIMIT a OFFSET b on \FaaPz\PDO\Clause\Limit#__toString that is the generic Limit syntax instead of LIMIT a, b which is only for MySQL

(You can take for reference the sql.sh website or this other one: https://www.sqltutorial.org/sql-limit/)

Thank you !

kwhat commented 3 years ago

Hi @JohnProgrammer71,

The change should be ok, can you fix the failing tests?

Thanks.

kwhat commented 3 years ago

https://github.com/FaaPz/PDO/blob/2.x/tests/Statement/SelectTest.php#L161

kwhat commented 3 years ago

I am pulling this in with PR #153 due to the tests still failing on this PR.