[Phpmyadmin-devel] sqlAddSlashes
Ayush Chaudhary
ayushchd at gmail.com
Wed Jun 26 14:42:15 CEST 2013
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 (http://SF.net) email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net (mailto:Phpmyadmin-devel at lists.sourceforge.net)
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20130626/df1c00b0/attachment.html>
More information about the Developers
mailing list