MedicOneSystems / MedicOneSystems/livewire-datatables

Wrong Syntax for Order Column Names

Open
#389 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

I am using here MSSQL and i got an error if columns are configured because of the order by Clause.

SQLSTATE[HY000]: General error: 20018 Incorrect syntax near '`'

I think it will be a problem with the syntax depending of the quotes because the column name is wrapped in simple quotes like:
order by `Gruppe` desc

The correct syntax should be

ORDER BY 'Gruppe' DESC

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, entry point, or test is named. Start by reproducing configured-column ordering against MSSQL and trace where the ORDER BY clause is generated; done means the generated query uses valid MSSQL identifier quoting and ordering works without the reported syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php, sql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.