[10.x] DB::raw remove backticks and add them to table.column #54814
Unanswered
mfaas89
asked this question in
Show and tell
Replies: 1 comment 4 replies
-
So you want to avoid typos with this? What if the column name is a reserved word? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue:
The exception I got was: "SQLSTATE[H093] Invalid parameter number (Connection: mysq, select ...)". There where no reserved keywords.
The query builder throws errors in some cases where backticks are not used on raw queries on execution.
If you execute the dumped query by sentry it will execute in mysql.
Products:
Solution:
Enforce backticks on raw expressions.
Remove all backticks and add them where the combination of table and column are used.
The exception I got was: "SQLSTATE[H093] Invalid parameter number (Connection: mysq, select ...)". There where no reserved keywords.
I created a pull request here #54813
I probably need to fix the styling and tests, but I would like to know if this is something that can be added?
Beta Was this translation helpful? Give feedback.
All reactions