Re: [web2py] lastName, firstName in form

2016-11-20 Thread 'Annet' via web2py-users
Hi Anthony and Richard, Thank you both for your replies It's probably a good idea to strip any leading/trailing whitespace before > the names are ever inserted in the database. > To solve the issue I use .strip() Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/bo

Re: [web2py] lastName, firstName in form

2016-11-16 Thread Anthony
It's probably a good idea to strip any leading/trailing whitespace before the names are ever inserted in the database. Anthony On Wednesday, November 16, 2016 at 9:28:56 AM UTC-5, Richard wrote: > > Here what I usually do for search in user field name : > > search_val = request.vars.txtSearch >

Re: [web2py] lastName, firstName in form

2016-11-16 Thread Richard Vézina
Here what I usually do for search in user field name : search_val = request.vars.txtSearch rows = db(((db.auth_user.registration_key != 'disabled') | (db.auth_user.registration_key == None)) & (db.auth_user.first_name.lower().like('%{0}%'.format(search_val.lower( | ((db.auth_use

Re: [web2py] lastName, firstName in form

2016-11-16 Thread Richard Vézina
.strip() Richard On Wed, Nov 16, 2016 at 2:29 AM, 'Annet' via web2py-users < web2py@googlegroups.com> wrote: > I have a form in which the user enter his name, for example: 'Thompson, > Brian' > > When I execute the following query: > > rowset = db(db.vtx_vertex.name.ilike(nameform.vars.name)) >

[web2py] lastName, firstName in form

2016-11-15 Thread 'Annet' via web2py-users
I have a form in which the user enter his name, for example: 'Thompson, Brian' When I execute the following query: rowset = db(db.vtx_vertex.name.ilike(nameform.vars.name)) This query return the correct result. However, when db.vtx_vertex.name is 'Thompson, Brian ' (a space after Brian) and na