Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ODBC Driver 18 for SQL Server][SQL Server]Incorrect syntax near 'offset'. #52952

Closed
gsferro opened this issue Sep 27, 2024 · 2 comments
Closed

Comments

@gsferro
Copy link

gsferro commented Sep 27, 2024

Laravel Version

11.23.5

PHP Version

8.2.7

Database Driver & Version

ODBC Driver 18 for SQL Server

Description

App Version
Laravel 11.23.5
PHP 8.2.7
OS Win 11
RGBD Sqlsrv

When calling paginate, it is generating the error below using sqlsrv

UsuariosAutorizados::paginate(2);
SQLSTATE[42000]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Incorrect syntax near 'offset'. (Connection: sqlsrv, SQL: select * from [usuarios_autorizados] order by [id] asc offset 10 rows fetch next 10 rows only)

image

Steps To Reproduce

# model
Users::paginate(2);

# view
$users->links()

# url
.../users?page=2

image

@staudenmeir
Copy link
Contributor

Hi @gsferro,
What version of SQL Server are you using? It looks like an older one. Laravel 11 requires SQL Server 2017+.

@crynobone
Copy link
Member

Hey there,

We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants