Hope this clarifies my question.

Basically I have 5 fields (last_name, middle_name, first_name, 
mother_full_name, father_full_name) in a table called names,

When I search a keyword "john", I would like to search it on a whole table. 
For example, is there any way to just do db(db.names.contains("%john%")) 
and it gives a list of rows with a searched keyword stored in it instead of 
doing this ==> 
db((db.names.last_name.contains("%john%")&(db.names.first_name.contains("%john%")&(db.names.mother_full_name.contains("%john%")....))

Thank you.

On Sunday, May 10, 2015 at 11:15:21 PM UTC-4, Anthony wrote:
>
> Sorry, you said you want to "search a keyword on a table instead of 
> selecting fields"? Perhaps you can clarify what you are trying to achieve.
>
> Anthony
>
> On Sunday, May 10, 2015 at 11:07:49 PM UTC-4, Kenneth wrote:
>>
>> Hi Anthony,
>>
>> Thank you for your reply as always. I believe the forwarded post is about 
>> how to show only a search option for searching throught a whole table. so 
>> unfortunately that post doesn't answer my question.
>>
>> Do you know how the search works behind of sql grid form? 
>>
>> Thank you.
>>
>> On Sunday, May 10, 2015 at 12:55:30 AM UTC-4, Anthony wrote:
>>>
>>> See https://groups.google.com/d/msg/web2py/WvGH9XAH160/TjzYVCDBzQ0J
>>>
>>> Anthony
>>>
>>> On Saturday, May 9, 2015 at 9:57:03 PM UTC-4, Kenneth wrote:
>>>>
>>>>
>>>> I am curious how I can implement the search widget used on sql grid.
>>>>
>>>> It seems to me that sql grid searche widget searches a keword over a 
>>>> whole table and show the result.
>>>>
>>>> Can anyone tell me how to create a search widget to search a keyword on 
>>>> a table instead of selecting fields?
>>>>
>>>> Thank you.
>>>>
>>>

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