Noted. Thanks :)

-- 
Ayush Chaudhary

On Tuesday, 25 June 2013 at 6:07 PM, Marc Delisle wrote:

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-sequences

--
Marc Delisle
http://infomarc.info

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Phpmyadmin-devel mailing list
Phpmyadmin-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel