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

? is not correctly parsed around SELECT, LIMIT and OFFSET #498

Closed
BackEndTea opened this issue Aug 14, 2023 · 2 comments
Closed

? is not correctly parsed around SELECT, LIMIT and OFFSET #498

BackEndTea opened this issue Aug 14, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@BackEndTea
Copy link
Contributor

This first query results in multiple An expression was expected. error, while query two has no issues.

This is valid through the PDO::prepare

SELECT ?
FROM uno
JOIN dos  ON dos.id = uno.id
LIMIT ? OFFSET ?
SELECT item
FROM uno
JOIN dos  ON dos.id = uno.id
LIMIT 10 OFFSET 5
@BackEndTea
Copy link
Contributor Author

Probably related to #492

@BackEndTea BackEndTea changed the title ? is not correctly parsed around SELECT, LIMIT and `OFFSET ? is not correctly parsed around SELECT, LIMIT and OFFSET Aug 14, 2023
@williamdes williamdes added the bug label Aug 14, 2023
@BackEndTea
Copy link
Contributor Author

Looks like support for SELECT was added with #515, but LIMIT and OFFSET are still not working properly

MauricioFauth added a commit to MauricioFauth/sql-parser that referenced this issue Sep 27, 2023
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
MauricioFauth added a commit to MauricioFauth/sql-parser that referenced this issue Sep 27, 2023
- Fixes phpmyadmin#498

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
@MauricioFauth MauricioFauth self-assigned this Sep 27, 2023
@MauricioFauth MauricioFauth added this to the 5.9.0 milestone Sep 27, 2023
MauricioFauth added a commit that referenced this issue Jan 20, 2024
[ci skip]

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants