DDC-3244: [GH-1101] Adding ` quote into INSERT SQL statement #4014

Closed
opened 2026-01-22 14:33:44 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 8, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of Cactucs:

Url: https://github.com/doctrine/doctrine2/pull/1101

Message:

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.

Originally created by @doctrinebot on GitHub (Aug 8, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of Cactucs: Url: https://github.com/doctrine/doctrine2/pull/1101 Message: 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 Bug label 2026-01-22 14:33:44 +01:00
admin closed this issue 2026-01-22 14:33:45 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 8, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1101] was closed:
https://github.com/doctrine/doctrine2/pull/1101

@doctrinebot commented on GitHub (Aug 8, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1101] was closed: https://github.com/doctrine/doctrine2/pull/1101
Author
Owner

@doctrinebot commented on GitHub (Aug 8, 2014):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Aug 8, 2014): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4014