Hi, I'm running this code right now: querylist = [] for term in request.vars: if term != 'n': querylist.append("(db.%s.%s.contains('%s'))" % (filname, term, request.vars[term])) queryterm = (' & '.join(querylist),) search = db(*queryterm).select()
The term in queryterm works perfectly if I use it manually on the database administration page, but when I run this code, I get "Key Error:foo" where foo is a field that I'm querying. Is there any easier way to do this? I'm not sure why I keep getting this error.