Massimo, what about a full text database search engine, but at web2py level to abstract databases peculiarities? Maybe its a silly idea... Alex F
El 29/10/2009 2:21, mdipierro escribió: > I think it does not show because you overwrite the variable at every > iteration > I would try something like this > > def index(): > key=request.vars.baton > records = {} > for tablename in db.tables: > table=db[tablename] > fields=[table[fieldname] for fieldname in table.fields] > queries=[field.like('%'+key+'%') for field in fields if > field.type in ['text','string']] > query=reduce(lambda x,y: x|y,queries) > records[tablename]=db(query).select() > return dict(records) > > It should display a list of records that match by any field without > duplicates > > > > -- Alejandro Fanjul Fdez. alex.fan...@gmail.com www.mhproject.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---