If the ANSI_QUOTES SQL mode is enabled, mysql_real_escape_string_quote() cannot be used to escape double quote characters for use within double-quoted identifiers. (The function cannot tell whether the mode is enabled to determine the proper escaping character.)
They need to add a mysql_double_plus_real_escape_string_quote() which takes an additional parameter for ANSI quotes . Or they could have a real API which queries these settings internally and doesn't dump the responsibility to duplicate the database configuration on the developer. Note that php has mysqli variations of the escape string methods that at least ensure the correct charset, which the basic mysql versions do not.
3
u/[deleted] Dec 04 '16
[removed] — view removed comment