Here the error message I get when I try it in pgAdmin ERROR: invalid escape string HINT: Escape string must be empty or one character.
Richard On Fri, Jan 15, 2016 at 11:54 AM, Anthony <abasta...@gmail.com> wrote: > This change was made in June to allow proper escaping of terms when using > .like, .startswith, etc. > > See > https://github.com/web2py/pydal/commit/221146064e47bc5dcb993a1e289fc06eb7589c64 > . > > The SQL "ESCAPE" keyword just specifies the character(s) to be used for > escaping within "LIKE" terms. > > Anthony > > > On Friday, January 15, 2016 at 11:15:03 AM UTC-5, Richard wrote: >> >> Hello, >> >> I notice that the web2py query below : >> >> db(db.auth_user.first_name.lower().like('%r'))._select(db.auth_user.ALL) >> >> Return that : >> "SELECT * FROM auth_user WHERE (LOWER(auth_user.first_name) LIKE '%r' >> *ESCAPE >> '\\'*);" >> >> Never see this before, may this is a bug? >> >> web2py 2.13.4 >> >> Richard >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.