MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 258 forks source link

MS SQL query error #104

Closed goldjunge4 closed 3 years ago

goldjunge4 commented 3 years ago

Hello,

I need to say that the package is really great but I am now stuck with an issue where I don't find any solution.

I have implemented everything according to the GitHub repo and the example files but every time I sort my table the query is wrong and the SQL Server throws an error because the sort field is wrapped into ''. I have copied the query from the data table and tried it in my SQL studio and the same issue. If I delete the '' in the query it is working fine. Change I config this somewhere?

Wrong generated query: select top 10 [stops].[start] as [start] from [stops] order by 'start' desc correct one: select top 10 [stops].[start] as [start] from [stops] order by start desc

tamazao commented 3 years ago

I am having the same issue. Would be great to be able to use this.

michiel-van-den-anker commented 3 years ago

I had the same issue so I patched in my fork: https://github.com/michiel-van-den-anker/livewire-datatables/commits/fix-for-mssql