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

Alone quote in SQL comment causes SQL translate error #423

Open
dakur opened this issue Aug 9, 2022 · 2 comments
Open

Alone quote in SQL comment causes SQL translate error #423

dakur opened this issue Aug 9, 2022 · 2 comments

Comments

@dakur
Copy link

dakur commented Aug 9, 2022

Version: dev-master

Bug Description

When you use single quote ' or " in a SQL comment, dibi fails with Dibi\Exception: SQL translate error: Alone quote

Steps To Reproduce

Make a comment in SQL query containg single ' or " in it. E.g. in tests/dibi/Connection.fetch.phpt:

$res = $conn->query(<<<SQL
SELECT [title] FROM [products] ORDER BY [product_id] -- this isn't working
SQL
);

Expected Behavior

Pass without problem

@dg
Copy link
Owner

dg commented Aug 9, 2022

Please send a PR if you can fix this.

@dakur
Copy link
Author

dakur commented Aug 10, 2022

Sorry, not that easy for me..

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

No branches or pull requests

2 participants