That doesn't work because if I put in 'Tom Jones' into my search it doesn't match either first name or last name. Only matches if I concatenate the first and last name fields together.
-Jim On Thursday, March 9, 2017 at 8:05:27 AM UTC-6, Áureo Dias Neto wrote: > > you can use the 'like' condition in w2p, something like this: > > > query = ((db.auth_user.like('%s%' form.var.name) or (db.auth_user.like('%s%' > form.var.name)))) > > 2017-03-09 10:52 GMT-03:00 Jim S <j...@qlf.com <javascript:>>: > >> That will work, but I'm only wanting 1 form field. Basically want to >> implement a CONCAT function like in the sample SQL Statement I mentioned >> above. >> >> -Jim >> >> >> On Thursday, March 9, 2017 at 7:47:16 AM UTC-6, Áureo Dias Neto wrote: >>> >>> or this: >>> >>> name = form.vars.name >>> lastname = form.vars.lastname >>> >>> query = ((db.auth_user == name) or (db.auth_user == lastname)) >>> >>> form = SQLFORM.grid(query) >>> >> -- >> 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+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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.