I have a php app that successfully makes SQL requests against MySQL servers. Nevertheless the same app breaks against DO managed database whenever the requests include double-quotes.
The following request returns an error 1054 with managed database while it works with classic MySQL servers.
select * from users where username="demo"
=> error 1054
select * from users where username='demo'
=> ok
Is there a way to configure DO managed database to accept double-quotes?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
This is related to the sql_mode used. There’s a sql_mode setting, ‘ANSI_QUOTES’ that will make the " an identifier character.
e.g.
I’ve removed the ANSI_QUOTES sql-mode setting at a session level.
You can change the global value under the settings tab of your instance(s).
Hope this solves your issue!
Andrew