Which postgres adapter are you using?
Try 
- contains('%Smith')
and (for case-insensitive query)
- contains('%smith', case_sensitive=False)

Paolo

On Tuesday, April 28, 2015 at 9:26:24 PM UTC+2, Tom Stratton wrote:
>
> For me, with the postgres adapter, the "contains" method is only returning 
> information when one of the items in the list is an exact match (case 
> insensitive) for the item I search for.
>
> so if the list is ['John Doe', 'Michael Smith', 'Karen Jones', 'Anne 
> Baker']
>
> contains('Michael Smith') returns the row but
> contains('Smith') does not
>
> I would like to be able to do 
> xxxx('% b%) and get back the row - Matching 'Anne Baker'
>
> Tom
>
>
> On Saturday, April 25, 2015 at 7:15:41 PM UTC-7, Massimo Di Pierro wrote:
>>
>> db.tablename.fieldname.contains('whatever')
>>
>>
>>

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

Reply via email to