Ayush Chaudhary a écrit :
Hi,
I was setting up some unit tests when I came across the function PMA_Util::sqlAddSlashes() Isn't it supposed to add slashes to single quotes? Because I tested this:
echo PMA_Util::sqlAddSlashes("pma_'db");
And the output was pma_''db
Is this the correct behaviour?
Hi Ayush, yes this is correct, see [0]. "A “'” inside a string quoted with “'” may be written as “''”. "
However, this function could be renamed escapeForSql() or something like that.
[0] http://dev.mysql.com/doc/refman/5.5/en/string-literals.html#character-escape...