dg / dibi

Dibi - smart database abstraction layer
https://dibiphp.com
Other
487 stars 135 forks source link

Alone quote in SQL comment causes SQL translate error #423

Open dakur opened 1 year ago

dakur commented 1 year ago

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 commented 1 year ago

Please send a PR if you can fix this.

dakur commented 1 year ago

Sorry, not that easy for me..