FaaPz / PDO

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

limit() clause does not work directly from form values #43

Closed quan-na closed 8 years ago

quan-na commented 8 years ago

Current limit() clause use is_int() to check params. I use $request->getParsedBody()['rowCount'] and it does not work. I then must cast it to int.

Please include this in limit() document in case someone has the same problem.

FaaPz commented 8 years ago

Thanks! I've implemented a small validation check in v1.10.0 (1e1bb3e49406594b76f6b897a9fe92ef6fb7cff6). Now it throws an error if the parameter isn't casted as integer before passing on.

quan-na commented 8 years ago

thank you

kbaryshnikov commented 8 years ago

There's a regression here. Please see #48

rrpadilla commented 8 years ago

Why you do not use in src/PDO/Clause/LimitClause.php public function limit($limit = 15, $offset = 0)