Closed tobiascapin closed 7 years ago
Maybe one could add support for using TOP(N) instead? I have done that in my forked version here: https://github.com/carestad/Medoo/commit/876df443b89e55d7a5748f1b721fa13e191fd8af
The implementation might not have been done right, and I'm not really a MSSQL guru, but it works for my use. Maybe just adding a support for TOP itself in the WHERE clause would be better.
Fixed it for get() too in latest commit: https://github.com/carestad/Medoo/commit/479fe6f997866ad3a94dc0a760e76a1c3d8c38e4
It supports limit for MSSQL 2012+ with FETCH ROW on Medoo 1.4.
Limit is not supported by mssql, however, I think could be quite easy to add a ROW_NUMBER ( ) OVER() as _uniquealias field in select statement and a WHERE _uniquealias BETWEEN X and Y statement.