[PR #1101] Adding ` quote into INSERT SQL statement #9159

Closed
opened 2026-01-22 16:03:26 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1101

State: closed
Merged: No


It is not working for table names which are the same as SQL keywords (such as order).

Getting exception:

Doctrine\DBAL\DBALException
An exception occurred while executing 'INSERT INTO order ( ... ) VALUES ( ... )' with params [ ... ]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order ( ... , ' at line 1

Solved by adding quotes.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1101 **State:** closed **Merged:** No --- It is not working for table names which are the same as SQL keywords (such as `order`). Getting exception: ``` Doctrine\DBAL\DBALException An exception occurred while executing 'INSERT INTO order ( ... ) VALUES ( ... )' with params [ ... ]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order ( ... , ' at line 1 ``` Solved by adding quotes.
admin added the pull-request label 2026-01-22 16:03:26 +01:00
admin closed this issue 2026-01-22 16:03:26 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9159