Of course no print required in .belongs()
:)
Richard
On Fri, Jan 15, 2016 at 1:41 PM, Anthony wrote:
> On Friday, January 15, 2016 at 1:28:35 PM UTC-5, Richard wrote:
>>
>> So to avoid issue someone has to :
>>
>>
>> print
>> db(db.auth_user.first_name.lower().like('%r'))._select(db.auth_user
On Friday, January 15, 2016 at 1:28:35 PM UTC-5, Richard wrote:
>
> So to avoid issue someone has to :
>
>
> print db(db.auth_user.first_name.lower().like('%r'))._select(db.auth_user.ALL)
>
Only if you're using the DAL to generate SQL statements to copy/paste to
pgAdmin.
Anthony
--
Resources:
So to avoid issue someone has to :
print db(db.auth_user.first_name.lower().like('%r'))._select(db.auth_user.ALL)
I wasn't know escape and still don't even after read the postgres doc :)
Richard
On Fri, Jan 15, 2016 at 1:02 PM, Niphlod wrote:
> Hehehehe. Before pasting intorno pgadmin you nee
Hehehehe. Before pasting intorno pgadmin you need to unescape python's own
escaping .
Select * from table where field like '%foo%' escape '\'
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/w
Pogres 9.1
On Fri, Jan 15, 2016 at 12:05 PM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:
> 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, Anth
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 wrote:
> This change was made in June to allow proper escaping of terms when using
> .like, .startswith, et
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
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
--
Re
8 matches
Mail list logo